aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Nuget Restore Problem with Xunit project for ASP.NET Core controllers with deps #813

Open dpbevin opened 8 years ago

dpbevin commented 8 years ago

Installed Software

I'm having an issue restoring nuget packages for an xunt project testing ASP.NET Core controllers (that targets net452).

Steps to Reproduce

  1. Open the attached ZIP file
  2. Ensure all project.lock.json files are deleted
  3. Open a command prompt and CD to the solution folder
  4. Run "nuget restore DepTesting.sln" and see you get the following error

Unable to resolve DepLibrary for .NETFramework,Version=v4.5.2.

The attached solution contains:

AspNetCoreDepTesting.zip

Have I done something stupid or is this a real problem?

Diagnostics

I originally had this problem on a build agent, so I've posted as much of the TFS logs (with "system.debug" set to true) as possible in the attached nugetrestorebuild.txt file.

nugetrestorebuild.txt

Update

I've reproduced the problem locally using only the attached zip file and nuget.exe. Previously the repro steps included TFS.

dpbevin commented 8 years ago

Potentially related to #741

ChristianSacramento commented 8 years ago

@dpbevin @davidfowl

error

With nuget create the spec file for depLibrary.dll

spec

Edit the spec file

editnuspec

Create nuget package

createnupkg

Delete the reference from WithDepWebSite

cleanoldreference

Install the new package DepLibrary.nupkg from your local nuget repository

localnuget

Run "nuget restore DepTesting.sln"

nugetrestoreok2

It works!

MichaelGiger commented 8 years ago

Potentially related to https://github.com/dotnet/cli/issues/3199#issuecomment-256876889