Visual Studio 2013 NuGet package recovery does not work from the command line (not msbuild, but vcvarsall.bat)

Visual Studio 2013 introduced a new way to restore a package without MSBuild, and the old way to Enable NuGet Package Restore is now deprecated .

After the project is transferred, as written in Nuget docs , when created in the recovery package, VisualStudio works, but when the assembly is performed using the VisulStudio command line and vcvarsall.bat event packages, they are not restored.

Did I miss something?


Conclusion

Well, if you call Visual Studio from the command line, package recovery is not called. Use manual package recovery with nuget.exe

nuget restore Solution.sln

For this particular line, you will need to install the entire NuGet system and add the path to it to the binary folder in the environment variable PATH

+4
source share
1 answer

At the command line, you must manually start Nuget restore solution.slnbefore calling msbuild.exe. This is just a small step before the start of assembly.

Visual Studio does this automatically, and the call is nuget restorealso made by Team Build as part of the workflow.

+6
source

All Articles