NPM: Package Manager Console Host Version 3.4.4.1321
nuget.exe: NuGet Version: 3.5.0.1938
Visual Studio: 2015 Enterprise
Attempting to restore and build a .nupkg file to bin gets different results, depending on if I use Visual Studio/NPM or Command Line/nuget.exe.
I can get the .dll files to output to bin with CL restore/build, but my .xml files in contentFiles folder ONLY write to bin with nuget.exe (command line restore and build), not with NPM (Visual Studio restore and build)
Should I not get the same output to bin folder and to project.lock.json regardless of what restore method I use? After inspection of project.lock.json I notice that the Command Line restore produces DIFFERENT output than a Visual Studio restore. That's why I am getting different output in the BIN.
I found a work around until Microsoft fixes this defect:
In Visual Studio 2015 Tools Menu
Select Options
Select Nuget Node
UNCHECK these two options:
Allow Nuget to Download Missing Packages
Automatically Check for Missing Packages During Build
C:\NuGet\nuget.exe restore $(SolutionPath)
Assumptions: Copy nuget.exe to the directory listed above: v 3.5 is the version I test with
Results:
This simulates the auto-restore feature that visual studio does. I find it's actually BETTER because you don't get that tedious modal window that pops up.
Try it out guys! You get the same results, but BETTER!