Hi Blair! I have latest stable version of WiX 3.0.
I was playing around with this issue and found a workaround. If I add a reference to "MyProject", Visual studio Solution Explorer displays a reference to it as "MyProject (MyProject\MyProject)". So I edited WiX project file (Setup.wixproj) manually. Original reference to "MyProject"in WiX project file that did not compile was: <ProjectReference Include="..\MyProject\MyProject.csproj"> <Name>MyProject (MyProject\MyProject)</Name> <Project>{3e483c28-64f3-478b-8297-2fafb426cae3}</Project> <Private>True</Private> </ProjectReference> After change a reference to "MyProject"in WiX project file looked like: <ProjectReference Include="..\MyProject\MyProject.csproj"> <Name>MyProject</Name> <Project>{3e483c28-64f3-478b-8297-2fafb426cae3}</Project> <Private>True</Private> </ProjectReference> After changing the name of a reference Visual studio Solution Explorer displayed a reference to "MyProject" properly as "MyProject" and everything works OK! I think this is a problem with Votive and environment variables... Best regards, Sandi ________________________________ From: Blair <os...@live.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Fri, November 6, 2009 1:36:48 AM Subject: Re: [WiX-users] Environment variable that has project name with parentheses - $(var.MyProject (MyProject\MyProject).TargetFileName) Attachments usually don't survive the list server. What version/build of WiX do you have installed? -----Original Message----- From: Sandi Remar [mailto:sandi_re...@yahoo.com] Sent: Thursday, November 05, 2009 12:43 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Environment variable that has project name with parentheses - $(var.MyProject (MyProject\MyProject).TargetFileName) Hello Blair! Thank you for your answer. But I wanted to ask something else. I will try to explain a little better: I have a solution named "MySolution" with two solution folders - "MyProject" and "MySetup". Solution folder "MyProject" has one library project named "MyProject". Solution folder "MySetup"has one WiX project named "Setup". When I add a reference to "MyProject", a reference is added as "MyProject (MyProject\MyProject)" - see attached pic. "TheSameName.bmp". If I try to compile <File Id="ServerDllFile" Name="$(var.MyProject(MyProject\MyProject).TargetFileName)" Source="$(var.MyProject(MyProject\MyProject).TargetPath)" DiskId="1" KeyPath="yes" /> I get an error : "Error 1 Undefined preprocessor variable '$(var.MyProject.TargetPath)'. D:\Zacasni\Test VS Project2\MySolution\Setup\Product.wxs 13 1 Setup" But if I rename a Solution folder "MyProject" to "MyProjectRenamed", and add a reference to "MyProject", a reference is added properly as "MyProject " - see attached pic. "DifferentName.bmp" and everything compiles OK. I can compile <File Id="ServerDllFile" Name="$(var.MyProject.TargetFileName)" Source="$(var.MyProject.TargetPath)" DiskId="1" KeyPath="yes" /> with no errors. Thank you for your time and patience, Sandi ________________________________ From: Blair <os...@live.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Thu, November 5, 2009 5:20:21 PM Subject: Re: [WiX-users] Environment variable that has project name with parentheses - $(var.MyProject (MyProject\MyProject).TargetFileName) For WiX, the solution isn't considered a project. So, your MyProject\MyProject is known to the WiX preprocessor as simply MyProject. Thus, no matter the name of the solution, your references will remain like $(var.MyProject.TargetFileName). Accessing the solution itself is via the following preprocessor macros: $(var.SolutionDir) $(var.SolutionExt) $(var.SolutionFileName) $(var.SolutionName) $(var.SolutionPath) -----Original Message----- From: Sandi Remar [mailto:sandi_re...@yahoo.com] Sent: Thursday, November 05, 2009 4:57 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Environment variable that has project name with parentheses - $(var.MyProject (MyProject\MyProject).TargetFileName) Hello everybody! I am new to WiX, so I hope that my question is not too dumb :-) I use Visual Studio 2008 with Votive and WiX 3.0. I have a problem using environment variables that have project names with parentheses. I stumbled upon this problem when I was adding a file to WiX source. I have a solution with a Solution folder "MyProject" that contains a project named "MyProject". Since a Solution folder name is the same as the name of a project in it, Visual studio obviously wants to destinguish these two names by changing a project name. I see this when I want to add reference to that project in Votive. When I click References->Add Reference->Project, I see a reference to "MyProject" listed as "MyProject (MyProject\MyProject)" Here is the problem - Visual studio sees "MyProject" as "MyProject (MyProject\MyProject)", but WiX reports an error when I compile this code: <File Id="ServerDllFile" Name="$(var.MyProject (MyProject\MyProject).TargetFileName)" Source="$(var.MyProject (MyProject\MyProject).TargetPath)" DiskId="1" KeyPath="yes" /> I guess that parentheses in project name disturbs preprocessor. When I change Solution folder name to some other name, "MyProject" is listed as "MyProject" and not "MyProject (MyProject\MyProject)" and everything is OK, WiX compiles with no errors, when I compile this code: <File Id="ServerDllFile" Name="$(var.MyProject.TargetFileName)" Source="$(var.MyProject.TargetPath)" DiskId="1" KeyPath="yes" /> I tried to put project name in double quotes , like $(var."MyProject (MyProject\MyProject)".TargetFileName), but this does not work... Does anybody have any suggestions? Thanks! Sandi ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users