RonC
RonC

Reputation: 33831

Why is package restore failing when I upgrade to ASP.NET Core 1.0.1?

I am attempting to install ASP.NET Core 1.0.1 on my windows 7 dev box which already has ASP.NET Core 1.0 working in Visual Studio Community 2015 Update 3.

To accomplish this I installed .NET Core 1.0.1 - VS 2015 Tooling Preview 2 from https://www.microsoft.com/net/core#windows as indicated by https://blogs.msdn.microsoft.com/dotnet/2016/09/13/announcing-september-2016-updates-for-net-core-1-0/

I then updated several version numbers in my existing project.json file from 1.0.0 to 1.0.1 so that my web application would use the new 1.0.1 components.

As expected this triggers a package restore, but unfortunately it fails. I can't figure out why the packages restore is failing. Any help would be greatly appreciated.

enter image description here

Here are the errors from the output window:

Errors in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'. PATH=.\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git C:\Program Files\dotnet\dotnet.exe restore "C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive.vs\restore.dg" log : Restoring packages for C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.json... error: Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'. log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.json... log : Writing lock file to disk. Path: C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.lock.json log : C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj log : Restore failed in 2895ms. Errors in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'.

My understanding is that the upgrade from ASP.NET Core 1.0 to 1.0.1 is suppose to be pretty easy so I must be missing something simple but after hours of looking I could really use some advice.

Upvotes: 0

Views: 1922

Answers (2)

vcsjones
vcsjones

Reputation: 141668

Not every package got version bumped to 1.0.1. There is no 1.0.1 version of IIS Integration on nuget. That component should be left at 1.0.0 in your project.json.

Upvotes: 1

Tseng
Tseng

Reputation: 64229

You didn't read the upgrade instructions (and here) correctly.

This is not a global version bump. Only the listed packages were upgraded to 1.0.1. All remaining ASP.NET Core packages stay at 1.0.0, this includes Microsoft.AspNetCore.Server.IISIntegration.

The affected packages are:

  • Microsoft.EntityFrameworkCore
  • Microsoft.AspNetCore.Server.Kestrel
  • Microsoft.AspNetCore.Mvc
  • Microsoft.AspNetCore.Antiforgery
  • Microsoft.AspNetCore.Routing

Upvotes: 5

Related Questions