Tuesday 29 April 2014

Build VS2010 Setup Projects with TFS Build

I wanted to build a .vdproj (setup project in VS 2010) with TFS build and found MS Build does not support that out of the box. Below are few link that explains  “how to do this with build template changes”.
 
All of above suggested changing build templates, which I am OK to do with. I thought there should be a easy way out. Yes of course there is. “Old but GOLD” article in MSDN has given me a hint.
I created an additional solution and a C# Class Library project.

001

I already had VS 2010 available in my build server.  I used my Setup Builder C# project “AfterBuild” to execute devenv.exe and build my solution with .vdproj. Then copied the Setup.exe and .msi file to Output to directory so that it will be copied to TFS build drop.
Below are the commands used in “AfterBuild” .

002


  
  
 


This builds my setup project with MSBuild and it executes devenv.exe to build the Main.Solution with .vdproj (setup project).

004
005

I believe it would be better if I could use the Build Template change approach. But with the time constraints, and when you need a quick solution using what I have explained above is definitely a useful workaround.







No comments:

Popular Posts