WixSharp.Project.BuildMsiCmd C# (CSharp) Method

BuildMsiCmd() public method

Builds the WiX source file and generates batch file capable of building MSI with WiX toolset.
public BuildMsiCmd ( string path = null ) : string
path string The path to the batch file to be build.
return string
        public string BuildMsiCmd(string path = null)
        {
            if (Compiler.ClientAssembly.IsEmpty())
                Compiler.ClientAssembly = System.Reflection.Assembly.GetCallingAssembly().Location;

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

Usage Example

Example #1
0
    public static void Main(string[] args)
    {
        var project = new Project("My Product",
                         new Dir(@"%ProgramFiles%\My Company\My Product",
                             new ODBCDataSource("DsnName", "SQL Server", true, true,
                                 new Property("Database", "MyDb"),
                                 new Property("Server", "MyServer"))));

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

        project.BuildMsiCmd();
    }