Skip to content

Commit 87add5f

Browse files
committed
Merge branch 'maintenance/net5.0-hosts' into develop
If a .NET Standard or even a .NET 3.x library is called from an application running .NET 5, then those libraries will also be executed using the .NET 5 runtime. As such, there's no reason to upgrade or even multi-target libraries to .NET 5 unless they need to take advantage of specific .NET 5 capabilities. None of the core OnTopic libraries currently need any of these capabilities, so they can remain in .NET Standard 2.1. This allows them to remain compatible with .NET 3.x while still taking advantage of e.g. performance improvements in .NET 5. That said, we expect most implementors will be using .NET 5, since it's usually a painless upgrade from .NET Core 3 and offers significant performance benefits. As such, it makes sense to upgrade the unit test libraries as well as the sample `Host` project to .NET 5 both to reflect real-world runtime conditions expected, but also to take advantage of those performance improvements. This update does just that.
2 parents 9f2da06 + c871825 commit 87add5f

13 files changed

Lines changed: 24 additions & 21 deletions

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
4+
<TargetFrameworks>net5.0</TargetFrameworks>
65
<UserSecretsId>62eb85bf-f802-4afd-8bec-3d344e1cfc79</UserSecretsId>
76
<IsPackable>false</IsPackable>
87
</PropertyGroup>
@@ -18,4 +17,4 @@
1817
<ProjectReference Include="..\OnTopic.All\OnTopic.All.csproj" />
1918
</ItemGroup>
2019

21-
</Project>
20+
</Project>

OnTopic.AspNetCore.Mvc.Tests/OnTopic.AspNetCore.Mvc.Tests.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
4+
<TargetFrameworks>net5.0</TargetFrameworks>
65
<IsPackable>false</IsPackable>
76
</PropertyGroup>
87

@@ -18,11 +17,7 @@
1817

1918
<ItemGroup>
2019
<ProjectReference Include="..\OnTopic.AspNetCore.Mvc.Host\OnTopic.AspNetCore.Mvc.Host.csproj" />
21-
<ProjectReference Include="..\OnTopic.AspNetCore.Mvc\OnTopic.AspNetCore.Mvc.csproj" />
22-
<ProjectReference Include="..\OnTopic.Data.Caching\OnTopic.Data.Caching.csproj" />
2320
<ProjectReference Include="..\OnTopic.TestDoubles\OnTopic.TestDoubles.csproj" />
24-
<ProjectReference Include="..\OnTopic.ViewModels\OnTopic.ViewModels.csproj" />
25-
<ProjectReference Include="..\OnTopic\OnTopic.csproj" />
2621
</ItemGroup>
2722

28-
</Project>
23+
</Project>

OnTopic.AspNetCore.Mvc.Tests/TopicViewComponentTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Linq;
76
using System.Threading.Tasks;
87
using Microsoft.AspNetCore.Http;
98
using Microsoft.AspNetCore.Mvc.Rendering;

OnTopic.AspNetCore.Mvc.Tests/ValidateTopicAttributeTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Microsoft.AspNetCore.Mvc.Controllers;
1111
using Microsoft.AspNetCore.Mvc.Filters;
1212
using Microsoft.AspNetCore.Mvc.ModelBinding;
13-
using Microsoft.AspNetCore.Routing;
1413
using Microsoft.VisualStudio.TestTools.UnitTesting;
1514
using OnTopic.AspNetCore.Mvc;
1615
using OnTopic.AspNetCore.Mvc.Controllers;

OnTopic.AspNetCore.Mvc/Components/PageLevelNavigationViewComponentBase{T}.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System;
76
using System.Threading.Tasks;
87
using Microsoft.AspNetCore.Mvc;
98
using OnTopic.AspNetCore.Mvc.Models;

OnTopic.Data.Sql/SqlDataReaderExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Linq;
1111
using System.Net;
1212
using Microsoft.Data.SqlClient;
13-
using OnTopic.Collections;
1413
using OnTopic.Collections.Specialized;
1514
using OnTopic.Internal.Diagnostics;
1615
using OnTopic.Querying;

OnTopic.Tests/BindingModels/ReferenceTopicBindingModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Mapping.Annotations;
76
using OnTopic.ViewModels.BindingModels;
87

98
namespace OnTopic.Tests.BindingModels {

OnTopic.Tests/ITypeLookupServiceTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88
using OnTopic.Lookup;
9-
using OnTopic.Metadata;
109
using OnTopic.Tests.TestDoubles;
1110
using OnTopic.Tests.ViewModels;
1211
using OnTopic.ViewModels;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
7+
namespace System.Runtime.CompilerServices {
8+
9+
/*============================================================================================================================
10+
| CLASS: IS EXTERNAL INIT
11+
\---------------------------------------------------------------------------------------------------------------------------*/
12+
/// <summary>
13+
/// The <see cref="IsExternalInit"/> class is made available as part of the .NET 5.0 CLR in order to enable init accessors.
14+
/// As this is not available in .NET Standard, however, we must maintain this separate copy until we migrate to .NET 5.0.
15+
/// </summary>
16+
internal static class IsExternalInit {
17+
18+
} //Class
19+
} //Namespace

OnTopic.Tests/KeyedTopicCollectionTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Collections.Generic;
77
using System.Linq;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
9-
using OnTopic.Attributes;
109
using OnTopic.Collections;
1110

1211
namespace OnTopic.Tests {

0 commit comments

Comments
 (0)