Over a million developers have joined DZone.

Automating the build of MSI setup packages on Jenkins

DZone's Guide to

Automating the build of MSI setup packages on Jenkins

· DevOps Zone
Free Resource

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

A short "how-to" based on an issue one of my work mates recently faced when trying to automate the creation of an MSI package on Jenkins.

Normally, Visual Studio solutions can be build on Jenkins by using the appropriate MSBuild plugin. Apparently though, for Visual Studio setup projects, MSBuild cannot be used and one has to switch to using Visual Studio itself to execute the build.

So the first approach was to use devenv.exe as follows

devenv.exe VisualStudioSolution.sln /build "Release"

While this works, the problem is that it is an "async call", meaning that the compilation goes on in the background while the console from which the build is executed, immediately returns. Obviously this isn't suited for being used on Jenkins. Searching around for a while, it turned out that you have to use devenv.com instead of devenv.exe:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"VisualStudioSolution.sln /build "Release"

Once you got that, integrating everything into Jenkins is quite straightforward:

(Obviously you may also simply set an environment variable pointing to devenv.com on your build server rather than indicating the entire path)

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs


Published at DZone with permission of Juri Strumpflohner, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}