Home: Unable to resolve Nuget Packages for .Net Core 1.1 Web Apps

Created on 31 Jan 2017  路  2Comments  路  Source: NuGet/Home

Details about Problem

Unable to resolve Nuget Packages for ASP.NET Core Web Application (.Net Core and .Net Framework) projects using the 1.1 templates. This results in failed builds no matter what I try.

NuGet product used (VS UI | Package Manager Console): Both of these

NuGet version (Package Manager Console Host Version 4.0.0.2215)

VS version 15.0.0-RC.3+26127.0

OS version win10 v1511 (10586.753

Detailed repro steps so we can see the same problem

  1. Open Visual Studio 2017 RC

  2. File > New Project > ASP.NET Core Web Application (.Net Core|.Net Framework)

  3. Select ASP.NET Core Templates 1.1 Web Application

  4. Unable to resolve nuget packages - Output Results:

Restoring NuGet packages...
Time Elapsed: 00:00:03.7700141
========== Finished ==========

Restoring NuGet packages...
Unable to resolve 'runtime.win.System.Net.Sockets (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.Net.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tools (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Collections (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.Console (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.Diagnostics.Debug (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tracing (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Globalization (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Globalization.Calendars (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.IO (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Reflection (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Reflection.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Runtime.Handles (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Text.Encoding (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Text.Encoding.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Threading.Timer (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Runtime (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.Microsoft.Win32.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Runtime.InteropServices (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.IO.FileSystem (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Resources.ResourceManager (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.Runtime.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.any.System.Threading.Tasks (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win)'.
Unable to resolve 'runtime.win.System.Net.Sockets (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.Net.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tools (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Collections (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.Console (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.Diagnostics.Debug (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tracing (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Globalization (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Globalization.Calendars (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.IO (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Reflection (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Reflection.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Runtime.Handles (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Text.Encoding (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Text.Encoding.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Threading.Timer (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Runtime (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.Microsoft.Win32.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Runtime.InteropServices (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.IO.FileSystem (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Resources.ResourceManager (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.Runtime.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.any.System.Threading.Tasks (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x64)'.
Unable to resolve 'runtime.win.System.Net.Sockets (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.System.Net.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tools (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Collections (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.System.Console (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.System.Diagnostics.Debug (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Diagnostics.Tracing (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Globalization (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Globalization.Calendars (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.IO (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Reflection (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Reflection.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Runtime.Handles (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Text.Encoding (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Text.Encoding.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Threading.Timer (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Runtime (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.Microsoft.Win32.Primitives (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Runtime.InteropServices (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.System.IO.FileSystem (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Resources.ResourceManager (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.win.System.Runtime.Extensions (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
Unable to resolve 'runtime.any.System.Threading.Tasks (>= 4.4.0-beta-24903-02)' for '.NETCoreApp,Version=v1.1 (win-x86)'.
NuGet package restore failed.
Time Elapsed: 00:00:03.3766249
========== Finished ==========

Restoring NuGet packages...
Time Elapsed: 00:00:01.1278294
========== Finished ==========

Other suggested things

Verbose Logs

I'm unable to find a Nuget.exe for this version to generate verbose logs

Sample Project

WebApplication8.zip

ByDesign

Most helpful comment

There is a workaround detailed in this community post:

It appears this issue was caused by a bad copy of Microsoft.VisualStudio.Web.BrowserLink that got into the Nuget cache on a particular machine. If you run into this problem, you can resolve it by deleting the Nuget cache at %userprofile%.nuget.

This workaround worked for me.

All 2 comments

There is a workaround detailed in this community post:

It appears this issue was caused by a bad copy of Microsoft.VisualStudio.Web.BrowserLink that got into the Nuget cache on a particular machine. If you run into this problem, you can resolve it by deleting the Nuget cache at %userprofile%.nuget.

This workaround worked for me.

Marking as design and closing, as it appears that this should be working with the current template.
Please chime in if I have interpreted this incorrectly.

Was this page helpful?
0 / 5 - 0 ratings