Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Build VS2015 project in bat command

Posted on 2016-09-17
3
Medium Priority
?
138 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 43

Accepted Solution

by:
pcelba earned 2000 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 43

Assisted Solution

by:pcelba
pcelba earned 2000 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

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

730 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