Wednesday 29 March 2017

Resolve - TFS Build Hang When Building Wix Projects

Wix tools can be used to generate msi installable packages, .exe setup bundles, .msm merge modules, and .msp patches. Getting a wix project built with visual studio is fairly simple. If you are using VS you can install the extension from marketplace and install wix tools to get going in the development environment. Tools available for VS 217, 2015, 2013, 2012 and 2010.

You can setup TFS builds to build wix projects following the instructions in http://wixtoolset.org/documentation/manual/v3/msbuild/wix_with_team_build.html. There is more detailed documentation available in http://wixtoolset.org/documentation/manual/v3/msbuild/. The blog here also useful http://programcsharp.com/blog/post/building-wix-with-msbuild.

However, when you are running a build to package .msi etc using wix project you might notice the build sometimes hangs forever. This happens because of a deadlock when msbuild and wix waiting on the output stream.

image

To prevent this from happening pass the argument below to build arguments.

/p:RunWixToolsOutOfProc=true image

This allows packaging of .msi with wix tool to run normally with TFS builds.image

5 comments:

Farrukh said...

Thanks a lot for posting this. It helped me out of same problem facing since two days, after our TFS was upgraded to 2017 and wix 3.10 starting hanging out giving no error, no warning.

Best regards.

Anonymous said...

Same here, been fighting this since moving to 3.10->3.11, thanks for post, saved me.

Anonymous said...

Thanks a lot! Great Job!
Dirk

Jiri Gargas said...

Thanks a lot!!!

Janmejay Ambardekar said...

Love you for this... It solved my long running problem. Thanks Chaminda.
After Chaminda Vaas, you are the next Chaminda I know for sure.

Popular Posts