Recently I had to configure companies Team Foundation Server to produce installers for the applications we are working on. Task seemed pretty straightforward at first, but then I realized that build definition for VSTS Team build won’t build a solutions setup project. Sometime later, however it was still possible to convince him to do so. Here is a quick walkthrough:
- 1. In solution properties enable build checkbox for the Release configuration for the setup

- 2. Create a build definition as you normally would.
- 3. Open the build definition project file (TFSBuild.proj) from source control and put following directive just before the end tag:
<Target Name="AfterCompile">
<Exec Command=""$(ProgramFiles)\Microsoft Visual Studio 9.0\
Common7\IDE\devenv"
"$(SolutionRoot)\Setup\Main\Corres\CorresSetup\CorresSetup.vdproj
" /Build
"RELEASE|Any CPU""/>
<Copy SourceFiles="$(SolutionRoot)\Setup\Main\Corres\CorresSetup\
Release\CorresSetup.msi ;
$(SolutionRoot)\Setup\Main\Corres\CorresSetup\Release\setup.exe"
DestinationFolder="$(OutDir)" />
</Target>
- 4. Check in the changes
b2cac2b0-f46e-4d51-af26-93ee159eceab|0|.0