WixSharp.Project.BuildWxs C# (CSharp) 메소드

BuildWxs() 공개 메소드

Builds the WiX source file (*.wxs) from the specified Project instance.
public BuildWxs ( Compiler type = Compiler.OutputType.MSI, string path = null ) : string
type Compiler The type () of the setup file to be defined in the source file (MSI vs. MSM).
path string The path to the WXS file to be build.
리턴 string
        public string BuildWxs(Compiler.OutputType type = Compiler.OutputType.MSI, string path = null)
        {
            if (Compiler.ClientAssembly.IsEmpty())
                Compiler.ClientAssembly = System.Reflection.Assembly.GetCallingAssembly().Location;

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

Usage Example

예제 #1
0
파일: setup.cs 프로젝트: Eun/WixSharp
    public static void Main(string[] args)
    {
        var featureA = new Feature("Feature A", "Feature A description");
        var featureB = new Feature("Feature B", "Feature B description");
        var complete = new Feature("Complete");

        complete.Add(featureA)
                .Add(featureB);

        var project =
                new Project("MyMergeModuleSetup",
                    new Dir(@"%ProgramFiles%\My Company",
                        new File(featureA, @"Files\MainFile.txt"),
                        new Merge(featureB, @"Files\MyMergeModule.msm"),
                        new Merge(featureB, @"Files\MyMergeModule1.msm")));

        project.DefaultFeature = complete;
        project.UI = WUI.WixUI_FeatureTree;
        project.InstallerVersion = 200; //you may want to change it to match MSM module installer version

        project.PreserveTempFiles = true;

        project.BuildWxs();
    }