sorosh_sabz
sorosh_sabz

Reputation: 3003

How to restore specific project with msbuild

As I know in msbuild 16.5+ we can restore all missing packages (packages.config and reference) with msbuild -t:restore -p:RestorePackagesConfig=true

my question is how to restore missing packages for specific project or solution folder with msbuild command like in Visual Studio with right click on project and click Nuget package manager and click restore button?

I use visual studio 2019 16.8.3

Upvotes: 1

Views: 1524

Answers (1)

Mr Qian
Mr Qian

Reputation: 23808

You have to specify the project on the command line like this:

msbuild xxx\xxx.csproj -t:restore,build -p:RestorePackagesConfig=true

Upvotes: 2

Related Questions