PDA

View Full Version : Make VS 2013 with NuGet


ssreedharan
04-24-2014, 01:57 PM
I am running into an error when trying to build a solution with VS2013. Our developers are using the NugetPackage manager internally while building their solution in VS2013. Now when I use the Make VS2013 command and try to build it using MSBuild, it fails because its not able to find any of the references and assemblies. However if I first open the solution in VS2013 and build it from there, it gets the Nugetupdates and its builds there successfully. AFter that when I run the build script with the MakeVS2013 command and use MSBuild, it builds successfully.
I need the solution to build on the fly, because I will be exporting code from subversion and then trying to build through Visual Build Pro. How can I get VBP to pick up the Nuget Package references for this to build successfully. Please help. Thanks

kinook
04-24-2014, 05:07 PM
http://www.kinook.com/Forum/showthread.php?t=4500

diamxus
08-13-2014, 08:21 PM
Just in case, someone needs another simple approach, I resolved this issue by doing the following:
• Download nuget.exe from https://nuget.codeplex.com/releases
• Place it somewhere you can reference it, for example, %PROJDIR%
• Create a NuGet step such as the one below:
<step action='NuGet'>
<Command>restore</Command>
<Exe>%PROJDIR%\nuget.exe</Exe>
<PackageId>c:\sourcecode\solutionroot\VS2013SolutionFileName. sln</PackageId>
<buildfailsteps type='11'>0</buildfailsteps>
<indent type='3'>1</indent>
<name>NuGet</name>
</step>

dhollman
12-06-2016, 08:37 AM
Update on prior message - the correct path to install Nuget is now:

https://dist.nuget.org/index.html