WixSharp.Project.BuildMsi C# (CSharp) Method

BuildMsi() public method

Builds the MSI file from the specified Project instance.
public BuildMsi ( string path = null ) : string
path string The path to the MSI file to be build.
return string
        public string BuildMsi(string path = null)
        {
            if (Compiler.ClientAssembly.IsEmpty())
                Compiler.ClientAssembly = System.Reflection.Assembly.GetCallingAssembly().Location;

            if (path == null)
                return Compiler.BuildMsi(this);
            else
                return Compiler.BuildMsi(this, path);
        }

Usage Example

Example #1
0
    public static void Main(string[] args)
    {
        var project =
        new Project("MyProduct",
            new Dir(@"%ProgramFiles%\My Company\My Product",
                new File(@"Files\Bin\MyApp.exe"),
                new File(@"Files\Docs\Manual.txt",
                    new FilePermission("Everyone", GenericPermission.Read | GenericPermission.Execute),
                    new FilePermission("Administrator")
                        {
                            Append = true,
                            Delete = true,
                            Write = true
                        }),
                new Dir(@"Docs"),
                new Dir(@"Docs2",
                    new DirPermission("Everyone", GenericPermission.All)),
                new Dir("Empty")));

        project.UI = WUI.WixUI_InstallDir;
        project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");
        project.EmitConsistentPackageId = true;
        project.PreserveTempFiles = true;

        project.BuildMsi();
    }
All Usage Examples Of WixSharp.Project::BuildMsi