Maybe this isn't Umbraco specific, But I've made a c# library for custom controllers and added necessary nugets.
But my Microsoft.AspNet.Mvc nugets gets following warnings
Severity Code Description Project File Line Suppression State
Warning NU1701 Package 'Microsoft.AspNet.Mvc 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. ClassLibrary1 C:\Users\svant\U9kitt\ClassLibrary1\Umbraco.Core.csproj 1
i Don't Know how to act on this problem
Im All new to Umbraco 9 and not to experienced with .Net either
It looks like you've installed .Net Framework MVC into your .Net Core Umbraco 9 project.
This is going to cause you all sorts of issues. I would advise replacing your custom library with a .Net Core custom library and using ASP.Net Core for your MVC code instead of what you are currently using.
If you need to be using .Net Framework MVC, then you'll need to use Umbraco v8 which works on .Net Framework :-)
Microdoft.AspNet.Mvc nuget varnings
Maybe this isn't Umbraco specific, But I've made a c# library for custom controllers and added necessary nugets. But my Microsoft.AspNet.Mvc nugets gets following warnings
Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Microsoft.AspNet.Mvc 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. ClassLibrary1 C:\Users\svant\U9kitt\ClassLibrary1\Umbraco.Core.csproj 1
i Don't Know how to act on this problem Im All new to Umbraco 9 and not to experienced with .Net either
Hi Svante-J
It looks like you've installed .Net Framework MVC into your .Net Core Umbraco 9 project.
This is going to cause you all sorts of issues. I would advise replacing your custom library with a .Net Core custom library and using ASP.Net Core for your MVC code instead of what you are currently using.
If you need to be using .Net Framework MVC, then you'll need to use Umbraco v8 which works on .Net Framework :-)
Thanks
Nik
The library should be net5.0
Project Sdk="Microsoft.NET.Sdk /// Is this the problem?
PropertyGroup TargetFramework>net5.0
is working on a reply...