The best way is to enable package restore during build, the feature added since NuGet 2.0 and improved as of NuGet 2.7.
By automating package restore in Visual Studio the build events can handle installing the missing packages which eliminate the necessity of keeping them in repository.
There are two levels which should be set, simply go for ToolsOptions and then try to choose Package Manager 1. Visual Studio is configured to 'Allow NuGet to download missing packages' 2. Visual Studio is configured to 'Automatically check for missing packages during build in Visual Studio'
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwwYlrYNFX3rtxdFpqeCsYH-WcK8bcgsNSDV1VDEite3fU-3Il6M9z6QTZOV3pr5BoHaHJks7dUDDpfE4xuJeptwLw8DHD8Y8-bw-LYDxwK5-8mCPolXxkpX0yINR8bZKjKyvyh1wVP-_V/s400/NugetPackageRestore(VisualStudio).jpg)
It’s done, but there is other options too like [MSBuild-Integrated Package Restore] which I’ll point to that in next blog entry.
No comments:
Post a Comment