Visual C++ redistributables

Apr 29, 2016 at 3:15 PM
Hi

How could I add Visual C++ redistributables into installer? This is the tutorial for wix (http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html) but I could not apply it for wixsharp.

Tibor
Coordinator
Apr 29, 2016 at 10:43 PM
There are various ways of doing this. The link you provided is about MSM. Thus you need to use MergeModule class:
var project =
        new Project("MyMergeModuleSetup",
            new Dir(@"%ProgramFiles%\My Company",
                new File(@"Files\MainFile.txt"),
                new Merge(@"Files\MyMergeModule.msm"),
                new Merge(@"Files\MyMergeModule1.msm")));
Have a look at <Wix# Samples>\MergeModules\Consuming MergeModule sample.
Or on git: https://wixsharp.codeplex.com/SourceControl/latest#src/WixSharp.Samples/Wix# Samples/MergeModules/Consuming MergeModule/setup.cs

Alternatively you can use bootstrapper. Samples for which are also included.
Marked as answer by fulbts on 5/30/2016 at 8:18 AM
Apr 30, 2016 at 6:10 AM
Thanks very much. I dont know why I did not notice reference to those samples in documentation