I have a product that can be built two ways. I have two WiX installer projects in visual studio, sharing many of the same wxs files. One project defines a variable in the project settings to cause some of the .wxs files to compile differently, like this: ... <Component Id="someFiles" Guid="8909196A-8C89-497c-A850-868D7648F063" > <File Id="file1" Source="..\..\SharedFiles\File1.exe" KeyPath="yes" Name="File1.exe"> </File> <?ifdef IsVersionA ?> <File Id="File2" Source="..\..\SharedFiles\File2_A.txt" Name="File2.txt"/> <?else?> <File Id="File2" Source="..\..\SharedFiles\File2.txt" Name="File2.txt"/> <?endif?> <File Id="File3" Source="..\..\SharedFiles\File3.txt" Name="File3.txt"/> </Component>
<Directory Id="ConfDir" Name="conf"> <Component Id="configFiles" Guid="936B3B83-AF5D-47ba-9985-3B4D22E6353B"> <?ifdef IsVersionA ?> <File Id="ConfigFile" Source="..\..\SharedFiles\conf\server-A.conf" Name="server.conf"/> <?else?> <File Id="ConfigFile" Source="..\..\SharedFiles\conf\server.conf" Name="server.conf"/> <?endif?> <File Id="otherConfig" Source="..\..\SharedFiles\etc\" Name="server-password.conf"/> </Component> </Directory> ... When my project built with "IsVersionA=true" defined in the project settings "File2.txt" in the msi was a copy of "File2_A.txt" but "server.conf" was a copy of "..\..\SharedFiles\conf\server.conf" NOT the expected "..\..\SharedFiles\conf\server-A.conf" When investigating I manually rebuilt only this project from the solution (after shuffling some lines around to make File Id="otherConfig" the key file of Component Id="configFiles") both files were correct. Note that there is another project in the solution that shares this same .wxs file and does not define the IsVersionA variable. I thought at the least that if for some reason the .wxs wasn't being recompiled properly between project builds when I built the solution (doing a "rebuild") that the results would be consistent within the single .wxs. They clearly were not - QA reported the file inconsistency. I double checked to confirm the problem by using orca to check the file sizes in the .msi. Then I double checked the preprocessor conditions in the .wxs source file. It was somewhat baffeling. I'm using an older build of WiX 3 (3.0.2925.0) because the recent builds don't work well with Visual Studio 2005. Of course we are noticing this now only a day or two away from when we need to release the production build... argh! Can anyone shed some light (hey that's almost a pun) on what might be going on and how I might deal with it in a reliable way. Getting inconsistent output from your build tools isn't a good thing. Thanks, Scott ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users