How to restore nuget package with devenv.exe

Preethi Ravi 30 Reputation points

I have an msi installer with some nuget packages used. I want to build this using devenv. I am using the below command but it fails since it is not restoring nuget package. Furthermore I am not using msbuild since it does not support vdproj. devenv ACustomerApp.sln /rebuild "Release|Any Cpu" How to restore nuget package with devenv?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,438 questions
{count} votes

Accepted answer
  1. walitalokar 80 Reputation points

    Use nuget.exe before devenv: Download and install the standalone nuget.exe tool from the official NuGet website: Open a command prompt and navigate to your solution directory. Run the following command to restore NuGet packages: nuget restore ACustomerApp.sln Once the packages are restored, you can use your original devenv command to build the solution: devenv ACustomerApp.sln /rebuild "Release|Any Cpu"

0 additional answers

Sort by: Most helpful