I am using WixSharp v1.9.2 to create an MSI file, and I am trying to add a ManagedAction to my Project object. However, when I execute the project.BuildMsi() instruction, I get the error message "Invalid characters in the path." I am creating the ManagedAction like this:
var project = new Project(
ProjectName,
...,
new ManagedAction(
session => {
return ActionResult.Success;
},
Return.check,
When.After,
Step.InstallFinalize,
Condition.NOT_Installed
),
...
);
And this is the exception that is thrown:
Invalid characters in the path.
in System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
in System.IO.Path.IsPathRooted(String path)
in WixSharp.WixEntity.IncrementalIdFor(WixEntity entity)
in WixSharp.WixEntity.get_Id()
in WixSharp.Compiler.ProcessCustomActions(Project wProject, XElement product)
in WixSharp.Compiler.GenerateWixProj(Project project)
in WixSharp.Compiler.BuildWxs(Project project, String path, OutputType type)
in WixSharp.Compiler.BuildWxs(Project project, OutputType type)
in WixSharp.Compiler.Build(Project project, String path, OutputType type)
in WixSharp.Compiler.Build(Project project, OutputType type)
in EndosightSetup.Program.CreateMsiFile() in D:\Projects\Lavoro\EndosightConsole\src\deploy\EndosightSetup\Program.cs:riga 180
in EndosightSetup.Program.<>c.<Main>b__27_2() in D:\Projects\Lavoro\EndosightConsole\src\deploy\EndosightSetup\Program.cs:riga 53
in EndosightSetup.Program.<Main>g__ConsoleLog|27_3(Int32 value, Action doAction) in D:\Projects\Lavoro\EndosightConsole\src\deploy\EndosightSetup\Program.cs:riga 60
Can you help me understand why this error is occurring and how to resolve it?