Closed wixbot closed 8 years ago
I mixed -template up with -t (I assumed it was the short form). What I actually meant is that the -t for the xsl transformation should support quotes. I hope this clarifies my confusion with the -template switch.
Thank you for replying. But this workaround is probably breaking things again (double double quotes if the function does not check for existing quotes) once the fix will be included. Regarding your other question: I recommend to always add double quotes around unquoted strings containing spaces regardless of the "switch". This way it will globally fix the problems with spaces in switches.
This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
Yes, it is possible if we don't do something to deprecate this call suggestion (i.e. check to see if the value already contains quotes). However, the fix for this will not be out for quite awhile. I also feel that when it is fixed, we will check for quotes. Especially when we look back at this bug and these comments.
The -template switch does not allow for spaces. Its use is "-template:fragment" with no space. Also, the value cannot contain spaces either. So no "-template:My Custom".
switch (truncatedCommandSwitch.Substring(9)) { case "fragment": ...
Unfortunately, this bug doesn't meet the v3.0 bar at this point. Moving to WiX v3.5. In the meantime, short path names should work (even if they are ugly).
Does the commandLineBuilder.AppendSwitch functions handle this correctly?
There is a workaround for this in order to get you up and running. Add XML escaped quotes (") on both sides of your file path. This worked in my testing.
<HeatFile
File=""..\2803656\Test This\Test This\test.txt""
Can you help me understand why you need to have the template switch place quotes around the value?
The HeatFile tasks forgets to add double quotes around the File and Templates variables/arguments:
\src\WixTasks\heatfile.cs
protected override string GenerateResponseFileCommands() { WixCommandLineBuilder commandLineBuilder = new WixCommandLineBuilder();
--> commandLineBuilder.AppendSwitch(this.File);
--> commandLineBuilder.AppendSwitchIfNotNull("-template:", this.Template); ...