Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Svante-J 7 posts 28 karma points
    Jan 17, 2022 @ 12:23
    Svante-J
    0

    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

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 17, 2022 @ 13:48
    Nik
    0

    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

  • Svante-J 7 posts 28 karma points
    Jan 18, 2022 @ 08:39
    Svante-J
    0

    The library should be net5.0

    Project Sdk="Microsoft.NET.Sdk /// Is this the problem?

    PropertyGroup TargetFramework>net5.0

Please Sign in or register to post replies

Write your reply to:

Draft