Automating the build of MSI setup packages on Jenkins
Join the DZone community and get the full member experience.
Join For Freea 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)
Published at DZone with permission of Juri Strumpflohner. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments