Bugs item #1964746, was opened at 2008-05-15 14:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1964746&group_id=105970
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: candle
Group: v3.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ross613 (ross613)
Assigned to: Nobody/Anonymous (nobody)
Summary: Variable Names Require Unique Project Names in Solution
Initial Comment:
In a large Visual Studio solution, there are these two projects called
"Common.csproj", each referring to logic in different namespaces, each in
different physical folders. When setting the File tag's Source attribute to a
WiX variable, we run into a problem. The syntax for the variable for both
projects is as follows:
$(var.Common.TargetDir)
In order to solve this problem, we looked at the .wixproj file's schema,
wherein we have a series of ProjectReference tags. Beneath the
ProjectReference node, there's a Name tag – presumed to contain the string
referred to by the WiX toolset to identify the project name within the WiX
variable syntax. Consequently, we changed our .wixproj as follows (note the
<Name> tag content):
58 <ProjectReference Include="..\..\..\src\Service\Common\Common.csproj">
59 <Name>ServiceCommon</Name>
60 <Project>{7b6ebb1f-3b75-4497-85fb-e524fc9486fc}</Project>
61 <Private>True</Private>
62 </ProjectReference>
63 <ProjectReference Include="..\..\..\src\Shared\Common\Common.csproj">
64 <Name>SharedCommon</Name>
65 <Project>{13736794-cc44-4834-86a6-9733ba4c2089}</Project>
66 <Private>True</Private>
67 </ProjectReference>
Ordinarily, the <Name> tags would have contained strings like "Common
(Shared\Common)" and "Common (Service\Common)"; and these strings would have
appeared within the References node of the WiX project. Instead "SharedCommon"
and "ServiceCommon" now appear in the References folder, as they do in the
listing above.
However, when building the WiX project from within Visual Studio, we're still
seeing the same original error we had when we'd first started building using
diplicate $(var.Common.TargetDir) strings in our .wxs file:
candle.exe(0,0): error CNDL0001: Item has already been added. Key in
dictionary: 'Common.Configuration' Key being added: 'Common.Configuration'
Done building project "Sonora.wixproj" -- FAILED.
The –d arugments used when candle.exe is run by the build still use the
"Common" string, suggesting that WiX is actually not looking at the .wixproj
file's ProjectReference\Name nodes for the strings used as WiX variable names –
it's simply using the project file name, looks like.
The proposal is that the behaviour should be that WiX variables should use the
.wixproj ProjectReferences\Name node strings in order to indicate a reference
to a project. Thus....
$(var.MyProject.TargetDir)
...would refer to the $(TargetDir) of the project called "MyProjct" and output
the pertinent string in place of the variable.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1964746&group_id=105970
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs