dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.21k stars 9.95k forks source link

Getting error from nuget when updating/creating new project in large solution #1512

Closed CeriQ closed 8 years ago

CeriQ commented 8 years ago

Project Microsoft.Extensions.Primitives is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Project Microsoft.Extensions.Primitives supports: dnx451 (DNX,Version=v4.5.1) One or more projects are incompatible with .NETCoreApp,Version=v1.0.

This error happens when I try to create a new ASP.NET Core RC2 project, and when I try to update our existing RC1 project to RC2. Creating a blank solution with a ASP.NET Core RC2 project works perfectly. I've tried clearing my local nuget cache, but it pulls the same package down anyways. I tried adding a reference to the Microsoft.Extensions.Primitives package in my dependencies directly, for example: "dependencies": { "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", "Microsoft.Extensions.Primitives": "1.0.0-rc2-final" }, but with the same error. Note that all the packages report the error since both IISIntegration and Kestrel depend on Primitives.

I then tried to change the target framework of my ASP.NET Core project, via: "frameworks": { "net452": { } }, But that gives me

Project Microsoft.Extensions.Primitives is not compatible with net452 (.NETFramework,Version=v4.5.2). Project Microsoft.Extensions.Primitives supports: dnx451 (DNX,Version=v4.5.1) One or more projects are incompatible with .NETFramework,Version=v4.5.2. Instead.

I'm at wits end. You're my only hope team!

CeriQ commented 8 years ago

Typical - just when I decide to ask for help, I find the reason. I deleted the files from the wrap folder, and I deleted the .lock file, and then it restored the correct packages.