Automated Build, have trouble building 3 packages in a build type
Hi,
Im trying to create an automated build using the Build Type.
I got it to build the four solutions I product use.
Now I want to automate the packaging of our product.
I placed the 3 vdproj file calls under the target aftercompile
When it runs, it packages the first one fine, but the second doesnt really do anything, and the third one throws an error.
Can the build type not handle more than one vdproj call?
I also tried separating each to a different target/station, but still got the same problem.
Please help
Thanks,
Staffan
[612 byte] By [
Sweed] at [2007-12-21]
Can you post the markup you are using (the AfterCompile target from your TfsBuild.proj file)?
-Aaron
Hi,
This is what I have in the aftercompile target either didnt work as expected :-(
In one target location:
===================
<!--
Added 06/20/2006 to package product after building --> <
Target Name="AfterCompile"> <!->
<
Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj" /Build "Debug|Any CPU"'/> <
Copy SourceFiles="$(SolutionRoot)\WCF-Prototype\SetupMarsServer\Debug\SetupMarsServer.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> <Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\MARS_UI_WebSetup.vdproj" /Build "Debug|Any CPU"'/> <
Copy SourceFiles="$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\Debug\MARS_UI_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> <
Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj" /Build "Debug|Any CPU"'/> <
Copy SourceFiles="$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\Debug\MARS_ASP_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> </Target> Separated into three different locations.
===========================
<!-- Added 06/20/2006 to package product after building -->
<Target Name="AfterCompile">
<!->
<Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj" /Build "Debug|Any CPU"'/>
<Copy SourceFiles="$(SolutionRoot)\WCF-Prototype\SetupMarsServer\Debug\SetupMarsServer.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" />
</Target>
<Target Name="AfterDropBuild">
<!->
<Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\MARS_UI_WebSetup.vdproj" /Build "Debug|Any CPU"'/>
<Copy SourceFiles="$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\Debug\MARS_UI_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" />
</Target>
<Target Name="BeforeTest">
<Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" "$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj" /Build "Debug|Any CPU"'/>
<Copy SourceFiles="$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\Debug\MARS_ASP_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" />
</Target>
Thanks,
staffan
Have you looked at the following post? http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159417&SiteID=1
Apparently the approach outlined there works pretty well. Differences I noticed from yours include:
* Calling devenv.exe rather than devenv.com.
* Specifying a solution, and then picking out an individual project using the /Project syntax.
* Setting the working directory for the Exec command.
* Using " syntax rather than the outer single quote, inner double quote syntax you have.
You might try these changes to see if they help. If not, go ahead and post the errors you are getting.
-Aaron
I entered the following and it keeps the build frozen. I have to kill it from the command prompt.
<
Target Name="AfterCompile" <Exec Command=""$(VS80COMNTOOLS)..\IDE\devenv.exe" "$(SolutionRoot)\WCF-Prototype\AppServerMaster.sln" /build "Debug|Any CPU" /Project "$(SolutionRoot)\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj""/>
<Exec Command=""$(VS80COMNTOOLS)..\IDE\devenv.exe" "$(SolutionRoot)\MARS_UI\MARS_UI.sln" /build "Debug|Any CPU" /Project "$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\MARS_UI_WebSetup.vdproj""/>
<Exec Command=""$(VS80COMNTOOLS)..\IDE\devenv.exe" "$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_Website.sln" /build "Debug|Any CPU" /Project "$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj""/>
Why does this act like it locked up on the last project of the solution?
Please advise.
Thanks,
staffan
This :
<
Exec Command='"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" "$(SolutionRoot)\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj" /Build "Debug|Any CPU" WorkingDirectory="$(SolutionDir)"'/>
gives me the following error in the log:
Target AfterCompile:
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" "C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\BuildType\..\Sources\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj" /Build "Debug|Any CPU" WorkingDirectory="C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\"
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" "C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\BuildType\..\Sources\MARS_UI\MARS_UI_WebSetup\MARS_UI_WebSetup.vdproj" /Build "Debug|Any CPU" WorkingDirectory="C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\"
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" "C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\BuildType\..\Sources\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj" /Build "Debug|Any CPU" WorkingDirectory="C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\"
C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\BuildType\TFSBuild.proj(176,5): error MSB3073: The command ""C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" "C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\BuildType\..\Sources\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj" /Build "Debug|Any CPU" WorkingDirectory="C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\"" exited with code 1.
Done building target "AfterCompile" in project "TFSBuild.proj" -- FAILED.
Done building project "TFSBuild.proj" -- FAILED.
Thanks,
Staffan
To Everyone ,
Here is a solution I finally got to work. It might not be the fastest, but it works.
I created a Batch File that creates the packages (.vdproj files).
In the .csproj file of the Build Type, I call this Batch File
Also, had to change the .target file so that when it compiles, it wont move the newly created output.
(Take out the OutDir parameter in the MSBUILD line)
Changes:
BATCH File:
--
rem ==== START ====
rem Package Setup
rem ==============
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE/devenv.com" C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\WCF-Prototype\AppServerMaster.sln /build "Release" /project C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\WCF-Prototype\SetupMarsServer\SetupMarsServer.vdproj /projectconfig "Release" > packsetup.log
rem Package UI
rem ==============
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE/devenv.com" C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_UI\MARS_UI.sln /build "Release" /project C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_UI\MARS_UI_WebSetup\MARS_UI_WebSetup.vdproj /projectconfig "Release" > packui.log
rem Package ASP
rem ==============
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE/devenv.com" C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\MARS_ASP_Website.sln /build "Release" /project C:\MARS_Daily_Build\MARS_Platform\SSMARSPackage\Sources\MARS_ASP_Website\MARS_ASP_WebSetup\MARS_ASP_WebSetup.vdproj /projectconfig "Release" > packasp.log
rem ==== END ====
NEXT :
--
In the Build Type .csproj file, I call this batch file and move the content to some other location:
<
Target Name="AfterCompile"> <
Exec Command="\\Dalxpdss\MARS_Daily_Build\ssPackage.bat"/> <
Copy SourceFiles="$(SolutionRoot)\WCF-Prototype\SetupMarsServer\Release\SetupMarsServer.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> <
Copy SourceFiles="$(SolutionRoot)\MARS_UI\MARS_UI_WebSetup\Release\MARS_UI_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> <
Copy SourceFiles="$(SolutionRoot)\MARS_ASP_Website\MARS_ASP_WebSetup\Release\MARS_ASP_WebSetup.msi" DestinationFolder="$(DropLocation)\$(BuildNumber)\" /> </
Target>
Thanks,
Staffan