Reputation: 1766
I'm trying to build an install with Wix in VS 2012, but I am unable to add "external" references
i have my project FirmwareUpload which is the thing I want to install with References to our company's framework. And FirmwareUploadSetup which is my installer project. I Added references in this project to my other project and create the XML :
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainEXE">
<!-- TODO: Insert files, registry keys, and other resources here. -->
<File Source="$(var.FirmwareUpload.TargetPath)">
<Shortcut Id="startmenuFWU10" Directory="ProgramMenuDir" Name="Firmware Upload 1.0"
WorkingDirectory="INSTALLDIR" Advertise="yes" />
<Shortcut Id="desktopFWU10" Directory="DesktopFolder" Name="Firmware Upload 1.0"
WorkingDirectory="INSTALLDIR" Advertise="yes" />
</File>
</Component>
<Component Id="AstuFMS">
<File Source="$(var.Astus.FMS.TargetPath)" Name="Astus.FMS.dll" ShortName="AF" />
</Component>
<Component Id="AstusServerBusinessLogic">
<File Source="$(var.Astus.Server.BusinessLogic.TargetPath)" Name="Astus.Server.BusinessLogic.dll"
ShortName="ASBL" />
</Component>
<Component Id="ETL">
<File Source="$(var.ETLElectronique.TargetPath)" />
</Component>
<Component Id="ETLBusiness">
<File Source="$(var.ETLElectronique.Business.TargetPath)" Name="ETLElectronique.Business.dll" ShortName="EB" />
</Component>
<Component Id="ETLCommon">
<File Source="$(var.ETLElectronique.Common.TargetPath)" Name="ETLElectronique.Common.dll" ShortName="EC" />
</Component>
<Component Id="ETLData">
<File Source="$(var.ETLElectronique.Data.TargetPath)" Name="ETLElectronique.Data.dll" ShortName="ED" />
</Component>
<Component Id="ETLNet">
<File Source="$(var.ETLElectronique.Net.TargetPath)" Name="ETLElectronique.Net.dll" ShortName="EN" />
</Component>
<Component Id="ETLWindows">
<File Source="$(var.ETLElectronique.Windows.TargetPath)" Name="ETLElectronique.Windows.dll" ShortName="EW" />
</Component>
</ComponentGroup>
this works !! when i execute the installer I get these files in my directory. But there are other files required for the software to run (Example: log4net.dll)
When I compile my "FirmwareUpload" project I get the log4net.dll (and many others). So I need these DLL in my install for the program to run once installed.
Worked by doing :
<ComponentGroup Id="DocumentationComponents" Directory="INSTALLFOLDER" Source="C:\fms\hotfix\v42x\V6\Utilitaire\FirmwareUpload\FirmwareUpload\bin\Debug">
<Component Id="log4net">
<File Name="log4net.dll" />
</Component>
<Component Id="Astus.Device.Configuration">
<File Name="Astus.Device.Configuration.dll" />
</Component>
<Component Id="Astus.Device">
<File Name="Astus.Device.dll" />
</Component>
<Component Id="Microsoft.Practices.EnterpriseLibrary.Common">
<File Name="Microsoft.Practices.EnterpriseLibrary.Common.dll" />
</Component>
<Component Id="Microsoft.Practices.EnterpriseLibrary.Data">
<File Name="Microsoft.Practices.EnterpriseLibrary.Data.dll" />
</Component>
<Component Id="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling">
<File Name="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll" />
</Component>
<Component Id="Microsoft.Practices.ObjectBuilder">
<File Name="Microsoft.Practices.ObjectBuilder.dll" />
</Component>
</ComponentGroup>
But is there a less "hardcoded" way ?
Upvotes: 5
Views: 10008
Reputation: 6667
You can use heat
(the "Harvest Tool") to scan a folder and generate the xml required to include files in that folder.
See http://wix.sourceforge.net/manual-wix3/heat.htm
Upvotes: 5