none
How to create private NuGet server application using target framework .Net core 2.2 ? RRS feed

  • Question

  • Hi,

      I am trying to create a private NuGet server application using .Net Core 2.2 framework.But i am getting below error when i install NuGet.Server(3.2.1) in my application. Any help would be appreciated.

    Error Description : 

    Severity Code Description Project File Line Suppression State
    Warning NU1701 Package 'NuGet.Server 3.2.1' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project. TestNuGetServer D:\TestNuGetServer\TestNuGetServer\TestNuGetServer.csproj 1

    Thanks in advance

    Wednesday, June 12, 2019 1:10 PM

Answers

  • That is a warning, not an error.

    The warning is telling you that the NuGet package was restored using the .NET 4.6.1 version. If you look at the package in NuGet then you can see it doesn't have a version for .NET Core. Therefore the warning makes sense. In most cases the warning can be ignored because 4.6.1 supports .NET Standard 2.0. However when dealing with ASP.NET-based packages, like this one, you'll run into issues as you cannot mix ASP.NET with ASP.NET Core.

    Options:

    1) ASP.NET Core (through 2.2) supports .NET Framework. Note that this is a stopgap as support for .NET Framework is going away in ASP.NET Core.

    2) Don't use NuGet Server as it hasn't been ported. You can look at using NuGet.Server.Core which is still .NET Framework-based but doesn't rely on ASP.NET so you have the non-UI functionality available. Then you can build your own UI.

    3) Change your project to use .NET Framework


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, June 12, 2019 1:33 PM
    Moderator

All replies

  • That is a warning, not an error.

    The warning is telling you that the NuGet package was restored using the .NET 4.6.1 version. If you look at the package in NuGet then you can see it doesn't have a version for .NET Core. Therefore the warning makes sense. In most cases the warning can be ignored because 4.6.1 supports .NET Standard 2.0. However when dealing with ASP.NET-based packages, like this one, you'll run into issues as you cannot mix ASP.NET with ASP.NET Core.

    Options:

    1) ASP.NET Core (through 2.2) supports .NET Framework. Note that this is a stopgap as support for .NET Framework is going away in ASP.NET Core.

    2) Don't use NuGet Server as it hasn't been ported. You can look at using NuGet.Server.Core which is still .NET Framework-based but doesn't rely on ASP.NET so you have the non-UI functionality available. Then you can build your own UI.

    3) Change your project to use .NET Framework


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, June 12, 2019 1:33 PM
    Moderator
  • Thanks Michael for your valuable reply.I will try to create Nuget server application using latest .Net framework version.

    Thursday, June 13, 2019 4:45 AM