Solved

Build VS2015 project in bat command

Posted on 2016-09-17
3
86 Views
Last Modified: 2016-09-24
I used to run build the solution using below command

CALL %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild /t:Build /p:VisualStudioVersion="14.0" "C:/Project/p2/test.sln" /m

But this command get failed...because the solution contain the nuget .It is not getting restored automatically while build solution through above command.
Can anyone have solution for this.?
0
Comment
Question by:Monica P
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 41803413
You have to restore nugets explicitly before MCBuild, e.g.

"C:\Program Files (x86)\MSBuild\nuget\nuget.exe" restore YourSolution3.0.sln
0
 
LVL 10

Author Comment

by:Monica P
ID: 41803523
i cannot find nuget folder in the msbuild Folder.So it throws error executing this command..
0
 
LVL 41

Assisted Solution

by:pcelba
pcelba earned 500 total points
ID: 41803670
So you have to download Nuget command line utility from e.g. this link: https://docs.nuget.org/consume/installing-nuget

You may download whatever version will work for you.

Install it in any folder which you may then use before the MSBuild.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question