Skip to content

Commit c8f9b4c

Browse files
committed
Removed C# 9.0 support for Host project
The `OnTopic.AspNetCore.Mvc.Host` project builds fine locally, but won't build in Azure DevOps as part of the CI/CD pipeline. To attempt a fix, I'm reverting the host project—and only the host project—back to the default of C# 8.0.
1 parent e9ccb06 commit c8f9b4c

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

OnTopic.AspNetCore.Mvc.Host/OnTopic.AspNetCore.Mvc.Host.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.0</TargetFramework>
55
<UserSecretsId>62eb85bf-f802-4afd-8bec-3d344e1cfc79</UserSecretsId>
66
<IsPackable>false</IsPackable>
7-
<LangVersion>9.0</LangVersion>
87
</PropertyGroup>
98

109
<ItemGroup>

OnTopic.AspNetCore.Mvc.Host/Views/Layout/_Layout.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<!-- /Page Header Area -->
2727

2828
<article itemscope itemtype="http://schema.org/WebPageElement" itemprop="mainContentOfPage" class="grid-container">
29-
<h1>@(Model.ContentType is "PageGroup"? "Overview" : Model.Title)</h1>
29+
<h1>@(Model.ContentType == "PageGroup"? "Overview" : Model.Title)</h1>
3030
<p class="subtitle">@Model.Subtitle</p>
3131
<section class="body">
3232
<partial name="_TopicAttributes" />

OnTopic.AspNetCore.Mvc.Host/Views/Shared/Components/PageLevelNavigation/Default.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<h2>PageLevelNavigation</h2>
44
<ul>
5-
@if (Model.NavigationRoot is not null) {
5+
@if (Model.NavigationRoot != null) {
66
foreach (var topic in Model.NavigationRoot.Children) {
77
<li><a href="@topic.WebPath">@(topic.ShortTitle?? topic.Title)</a></li>
88
}

0 commit comments

Comments
 (0)