This project is read-only.

Creating MSI files with NPanday

Jul 10, 2009 at 6:03 PM

We're using NPanday to build .NET code, and I'm being asked to produce MSI files.  I'm familiar with the Wix project which can do this, and I remember there was some discussion of having a plugin for it, possibly back at NMaven.

Does anyone happen to be working on this already?  I'm planning to give it a try and could contribute it, if you think it would fit in with the project.

From my brief investigation, it seems like the developer will need to write the xml file that describes what goes in the MSI file, and then we should be able to execute the wix command line to create the file.

The things I am not sure of are.

1. How to tell wix where the compiled files are.  This is usually a path in the XML that the developer creates.  So I would need to tell it where to get them in either the local repo or the reactor?

2. How to tell wix where to get the other files needed such as images and so on so that it can add those.  This is also a path in the wix xml.

So basically the WIX project is a separate project in VS and would be built last after all the other projects.  It would then have to know where to get that stuff and as the developer will most likely code that to a specific directory some form of substitution would need to take place for those paths.

I think some of this is solved with the part of NPanday that is building the zip file.

Any input would be most helpful.


Jul 13, 2009 at 11:21 PM

I'm also interested in this-- being able to create msi files seems like a necessary feature for a .NET build tool.

It sounds similar to the the assembly plugin, where you also write an xml file that says what goes in the archive.  That also works best as a separate module that builds at the end.

The plugin itself will probably be closer to the many other plugins that wrap a command-line tool.

I looked back at NMaven and found some source code:

On your questions...

I see it pulling in the needed files as dependencies from the local repo.  So perhaps the xml file for wix would end up getting generated, or at least post-processed a bit. 

Or maybe you would dependency:unpack everything it needs, and then the paths to everything would be relative to the current directory, under target.

We can probably start with a hard-coded wix xml config file and back up to the point that it's all configurable.

What do the developers think about starting on this here?



Jul 16, 2009 at 5:53 AM

I've started on this and have a very simple mojo for 'candle' which turns a .wxs file into a .wixobj file, plus the beginnings of an integration test, based on the tutorial at .

It's living over at github:

This week I'll automate the integration test(s), write some docs, and contribute what I've done so far.  (Though the devs haven't commented yet if it's welcome here?)

Other useful links:

 * a GUID generator

 * Commons Exec docs

 * WiX user list


Jul 16, 2009 at 8:16 AM

Hi Wendy and cbown75,

Sorry for the late reply, yes its more than welcome here, Please feel free to contribute the code in.

None of the devs are currently working on this one at the moment.


Jul 18, 2009 at 5:17 AM

Thanks!  I've attached my first attempt to this issue:

It currently executes 'candle' on a .wxs file and produces the .wixobj file. (Next up would be 'light' to make the .msi file.) There is an integration test in src/it/IT001 and initial docs for the plugin and the one goal.

Please take a look and let me know what you think.


Aug 3, 2009 at 10:46 PM

ping?  It's been a couple of weeks, and I was hoping someone would have time to take a look at this.  Thanks, -Wendy

Aug 27, 2009 at 4:11 AM
On Fri, Jul 17, 2009 at 9:17 PM, wsmoak<> wrote:

There is more info on the issue, but I had a question now that it's
been applied to trunk.

This is a new feature, which I wouldn't expect to see in a patch
release (1.0.x). Should trunk move to version 1.1 now?

Sep 3, 2009 at 6:48 PM

Just a quick status update -- the WiX plugin is going well, we have support for candle and light with many of their command line parameters configurable through the plugin.

If you want to see how to use it to create .msi files, take a look at the plugin docs or check out the integration tests at .

Work is being tracked on issue 9272 .