visual-studio-2010continuous-integrationteamcityteamcity-7.1

How to build .vdproj msi using TeamCity?


I am trying to get continuous integration setup using TeamCity to automatically build and release our application and Windows services. The solution currently consists of a web application and 2 services (amongst a host of other projects, but all that gets deployed is the app and services) - the services are packaged into .msi installers using Visual Studio 2010 setup projects (.vdproj).

The web application isn't an issue because I can just use MsBuild.exe to publish. However, MsBuild.exe doesn't build .vdproj projects. One solution I've come across is to use devenv.com, e.g. "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" SolutionFile.sln /Build "Release" /Project SetupProjectFile.vdproj.

I'm new to TeamCity so I don't know how to approach this. I've tried adding a build step using the Command Line runner, but that just fails with the error (Command Line) failed. How do you achieve this?


Solution

  • Try using msbuild scripts. Msbuild scripts can be specified in Teamcity and you can pass in parameters to customise it as well.

    Another good read is Implementing TeamCity for .NET Projects, Part 4: Using Build Scripts by Elegant Code Blogging Community.