问题
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?
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/19434596/how-to-build-vdproj-msi-using-teamcity