My application depends on .Net 3.0, Visual Studio runtime and SQL Express. I'm trying to figure out how to create an MSI file that will install all those dependencies with my application.
I've search for samples and guide about how to do it and this is what I found so far:
1) For .Net, I use CommonTasks SetNetFxPrerequisite() to ensure that the target system has it, I would prefer installing it directly along the application, but it's not mandatory.
2) For the runtime, I'm trying to use the MergeModules samples "Consuming MergeModule" to package and install "Microsoft_VC120_CRT_x64.msm" with my MSI, but with no success:
I'm adding in my Project construction this line
and also this, a little further (it removes one error) :
project.Package.AttributesDefinition = "InstallerVersion=300; Platform=x64";
But I got tons of the following error for each file added in the project :
error LGHT0204: ICE21: Component: 'Component.HealthContributor.exe' does not belong to any Feature.
Finally, for the SQLExpress MSI (which is the main priority for my project), I'm trying to figure out how to use the technique shown in this S/O thread:
But I don't really understand how to translate raw Wix XML into WixSharp commands.
I trully hope there's a way to at least bundle SQLExpress with my application MSI installer.