Consider the following scenario:
- Project CommonLib
- CommonLib.dll
- Project AExe
- CommonLib.dll
- AExe.exe
- Project BExe
- CommonLib.dll
- BExe.exe
Project AExe is installed in %ProgramFiles%\AExe\bin
and BExe %ProgramFiles%\BExe\bin
but both are deployed using the same .MSI
How can I declare the CommonLib.dll as a generic component and then reuse it in AExe Directory[Ref]
and BExe Directory[Ref]
?
What I would like do:
<Fragment>
<Component Id="C.CommonLib.dll" Guid="*">
<File Id="Fi.CommonLib.dll" Source="<path>CommonLib.dll" KeyPath="yes"/>
</Component>
<Directory Id="ProgramFilesFolder">
<Directory Id="Di.AExe" Name="AExe">
<Directory Id="Di.AExeBin" Name="bin">
<ComponentRef Id="C.CommonLib.dll"/>
</Directory>
</Directory>
<Directory Id="Di.BExe" Name="BExe">
<Directory Id="Di.BExeBin" Name="bin">
<ComponentRef Id="C.CommonLib.dll"/>
</Directory>
</Directory>
</Directory>
</Fragment>
But that doesn't work because Directory
doesn't allow a Ref
as child. How would you code that?
P.S: I give the example with 2 projects but in reality there is much more projects that shares more than one common lib, that's why I'm asking that :)