Click here to Skip to main content
15,885,899 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am trying to automate build on my visual studio project from command prompt. The following is the code which I have tried.

VB
"C:\Progra~1\Microsoft Visual Studio 9.0\Common7\IDE\devenv" "C:\Users\Admin\Desktop\WcfRestApplication3\RestService\
RestService.vdproj" /Build "Release" /Project RestService


But I got the following error

C#
Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
------ Starting pre-build validation for project 'RestService' ------
ERROR: Cannot find outputs of project output group '(unable to determine name)'.
  Either the group, its configuration, or its project may have been removed from
 the solution.
ERROR: Cannot find outputs of project output group '(unable to determine name)'.
  Either the group, its configuration, or its project may have been removed from
 the solution.
------ Pre-build validation for project 'RestService' completed ------
------ Build started: Project: RestService, Configuration: Release ------
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========


Can someone help me to resolve this?

NB: I have already tried this.[^]

Thanks & Regards
Sebastian
Posted
Updated 24-Jun-12 18:57pm
v3
Comments
Richard MacCutchan 22-Jun-12 7:58am    
The 'commands' above do not make any sense, all you have is some pathnames, but no actual commands. Also, what happens when you try to build this within Visual Studio?
Sebastian T Xavier 25-Jun-12 1:23am    
Thanks Richard for your time.
The above command does make some sense. Here is my explanation....
"C:\Progra~1\Microsoft Visual Studio 9.0\Common7\IDE\devenv" -> This line invokes the denenv.exe
"C:\Users\Admin\Desktop\WcfRestApplication3\RestService\RestService.vdproj" -> This line specifies the path and name of project to be built.
/Build "Release" /Project RestService -> This line contains the command Build, and specifies it is in Release mode and contains the project name.

In visual studio, I can build this project and create msi file & exe. But I want to automate build procedure, without depending on developer. Any help on this would be appreciated.

Regards
Sebastian
Richard MacCutchan 25-Jun-12 4:06am    
Sorry, I must have been asleep when I typed that. See my latest suggestion.
Sebastian T Xavier 25-Jun-12 5:39am    
That's cool. Thank you Richard.
Steve Maier 22-Jun-12 11:22am    
When I run from the commandline, I typically use the sln name and not the project name as the first parameter. Not sure this would help you tho.

Hello,

This problem is solved. I could run the below script by creating a solution with the same name of my web setup project.

XML
"C:\Progra~1\Microsoft Visual Studio 9.0\Common7\IDE\devenv" "C:\Users\Admin\Desktop\SebNewRESTSetup\SebNewRESTSetup.sln" /Build "Release" /Project SebNewRESTSetup


Thanks for all who support me to solve this.

Sebastian
 
Share this answer
 
From looking at the devenv /Build[^] command, it would seem that you have some parameters missing. According to the documentation the solution file is also required.
 
Share this answer
 
Comments
Sebastian T Xavier 25-Jun-12 7:32am    
Thanks Richard, for your reply. I have checked this URL earlier and found it is really helpful. Here, the syntax and parameters are seems to be correct as I have successfully tested a desktop application's setup project(Actually I want to build a set up project; that's why the extension is xxx.vdproj). In current scenario, it is a multi-project solution with two class libraries and a REST Web Service.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900