I just fixed dotnetinstaller#8157. It was a humbling and head-scratching two hours.
The story goes like this. dotNetInstaler embeds files into the final bootstrapper. When built on Windows 7, everything works fine. When built on Windows XP or 2003, the executable produced runs, but its resources can no longer be loaded (which causes the htmlInstaller UI to look ugly). If you try to open the executable generated on Windows XP in Visual Studio, the latter will complain that the resources cannot be enumerated.
I spent two hours trying to compare the binary output, which obviously looked quite different. I found that the executable generated on XP is bigger than the one generated on Windows 7. So I gradually reduced the problem to a single resource and that (almost) worked. The generated binary was okay, but I noticed that my output on Windows 7 ended up with a single INDEX_HTML resource, while the output on Windows XP with two resources, “INDEX_HTML” and “index_html”. Bingo! Writing the second resource called “style_css” on top of “STYLE_CSS” corrupted the binary.
The fix was a simple
resourceid.ToUpper(). The why or the how question is left for Raymond Chen as homework.