Solved

Build VS2015 project in bat command

Posted on 2016-09-17
3
108 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 42

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 42

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 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