Search This Blog

Friday, November 5, 2021

[Visual Studio] 下載NuGet套件(Restore NuGet packages)

在命令列模式下使用MSBuild下載Nuget套件(Restore NuGet packages in command line)

msbuild version > 16.5

專案中有packages.config檔案

在有.sln檔案的路徑,執行以下命令即可

msbuild -t:restore -p:RestorePackagesConfig=true


Reference:

https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore#restore-using-the-nugetexe-cli