Closed silkfire closed 3 years ago
I actually need it on asp.net core 2.1 currently. That said it makes sense to support a build target of 3.0 in addition to 2.1
I'll look at adding it with some conditional package references
Could we push this now as .NET 5.0 has been released?
Touche .... let me look at it this evening. Sorry about that.
The
Grace.AspNetCore.MVC
project currently makes use of outdated ASP.NET Core dependencies, previously distributed as NuGet packages. Since .NET Core 3.0, ASP.Net Core packages are included implicitly in the SDK by adding a framework reference to the project file.I suggest to change the project from targeting .NET Standard to targeting .NET Core to support the newer packages. Any .NET web project surely wouldn't target Xamarin.iOS or other framework so this should be a safe operation in my opinion. The tricky part is determining whether to use .NET Core 3.0 or 3.1.
As an example, my project does not use Newtonsoft JSON, yet because
Grace.AspNetCore.MVC
uses the old NuGet packages (ASP.NET Core 3.0+ is part of the SDK, no longer distributed through NuGet), theNewtonsoft.Json.dll
ends up in the artifacts of my deployed application.The project TFM (Target Framework Moniker) should be changed to
netcoreapp3.0
ornetcoreapp3.1
:References
https://andrewlock.net/converting-a-netstandard-2-library-to-netcore-3/ https://stackoverflow.com/a/57760357/633098