Nuget packages & Dotnet publish taking forever

2.1k views Asked by At

Anybody is familiar with Nuget Packages in IIS server?

I'm stuck with a serious issue from 3 days.

I tried installing and pushing .nupkg file I have to nuget.org by making source as my local server by adding it as local feed.

After this problem I tried to host a new .netcore site in IIS by publishing the code first but when I try "dotnet publish" it is showing MS NU1100 error and failing.

Then after I tried some ways which I got from internet like deleting Nuget.Config file from %AppData% folder since then when trying "dotnet publish" it is taking for ever until I fed up and abort it myself.

1

There are 1 answers

1
YurongDai On

About NuGet Error NU1100

Scenario 1

Unable to resolve 'Dependency (>= 1.0.0)' for 'TargetFramework'

Issue

A dependency could not be resolved. This is a generic issue for types that are not packages or projects.

Solution 1

Open the project file and examine the list of its dependencies. Check that each dependency exists on the package sources you're using, and that the package supports the project's target framework.

Solution 2

This issue may also be caused by the lack of configured NuGet sources. Sometimes a configuration may not specify any sources. You can verify this by running dotnet nuget list source from the project or solution directory. Check the content of the user configuration and add a source there. Alternatively, you can create a configuration file using dotnet new nugetconfig. We recommend that you create this file at the repository level.

Scenario 2

Unable to resolve 'Dependency (>= 1.0.0)' for 'TargetFramework'. PackageSourceMapping is enabled, the following source(s) were not considered: nuget.

Issue

A dependency could not be resolved. PackageSourceMapping is enabled and there are no matching sources.

Solution

Check your NuGet.Config for the PackageSourceMapping configuration and ensure there's a matching pattern for the package in question.