Question

I've already got a NAnt build script that builds/runs tests/zips web project together, etc. but I'm working on a basic desktop application. How would I go about build the setup project using NAnt so I can include it with the build report on TeamCity.

Edit: The setup is the basic Setup Project supplied with Visual Studio. It's for internal to a company so it doesn't do anything fancy.

Was it helpful?

Solution

It's been a few years, but the last time I had to do this, I used a tool called Wix, which had utilities named Candle and Light. I used these tools in my NAnt script to create an MSI Installer.

OTHER TIPS

The only way to build a Visual Studio setup project is through Visual Studio. You will need to have a copy of VS installed on the build machine and run it as a command line tool (exec devenv.exe) with the appropriate parameters (which should be the build mode (release or debug) and the project name to build, there might be a few others but you can run devenv /? to get a list of the different command line options).

Instead of trying to build using MSBUILD (assumption), build the solution or project using DEVENV.EXE. The command line is something along the lines of:

DEVENV MySolutionFile.sln /build DEBUG /project SetupProject.vdproj

You can change the DEBUG to RELEASE or any other build configuration you've set up. You can also leave out the /project... part to build the whole solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top