Join GitHub today
Lineendings of a new *.wixproj #5714
Figured this out. Visual Studio does the equivalent of parsing the project file templates into a DOM tree, replaces the replacement strings, then writes out the tree as the new project file without preserving whitespace. Since VS's defaults are tabs and CRLF line endings, and since the multi-line comments aren't reformatted (although they are string-replaced), the behavior above does result.
The two solutions are (take your pick):
I think the former has a higher likelihood of success.
Interestingly enough, the source file templates are NOT processed the same way, even though they also have the string replacements. This leads me to the conclusion that the project files are processed by VS in other ways that don't preserve insignificant whitespace, causing this issue.
Thus, only the *proj template files need to be changed.