How to build .vdproj msi using TeamCity?

2019-07-31 14:22发布

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?

2条回答
迷人小祖宗
2楼-- · 2019-07-31 15:04

You could install Visual studio on build server, and run devenv.exe from a commandline build runner in TeamCity. It doesn't feel right, but I think it will work. See this link.

查看更多
别忘想泡老子
3楼-- · 2019-07-31 15:20

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.

查看更多
登录 后发表回答