user421479
user421479

Reputation: 11

Build Vs2012 Sln through MSBuild comment prompt . with nuget reference

We are planning to build the solution through cmd using msbuild. The project solution (.sln) have the nuget reference. We are getting the error while building the project sln. like nuget error.

Restoring NuGet packages... To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. C:\Program Files (x86).nuget\nuget.targets(89,9): error : Unable to find version '3.0.0.0' of package X'.

How to restore the nugets while building the solution?

Upvotes: 0

Views: 103

Answers (1)

Dan Liu
Dan Liu

Reputation: 827

NuGet package restore is executed before the solution is built.

This error usually means that NuGet cannot find the package X from the current active package source.

can you check the active package sources from Tools -> Options -> Package Source to see if necessary package sources are selected.

Upvotes: 0

Related Questions