The project I'm working on is switching from using the VS2008 deployment/installer to WiX, which i'm currently very new to. I've added the code to copy the output of the resources project into the Resources.dll, but in the old VS2008 installer file system there is also the localized resources output which currently produces two foldes (en and es) with another dll in (Resources.resources.dll) for each language. I've had a bit of a search, but can't seem to find the method of getting these folders into the msi short of actually knowing that those folders exist and putting them straight in. What's the best way to do this?
Define <Directory>
elements in your Wix source for each of the localization folders (en and es), then define <Component>
elements within them for your satellite assemblies.
In short, put them straight in!
Here is what worked for me, for 2 languages.
I added localeDirectoryFR and localeDirectoryJA as seen below, for French and Japanese:
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='CmisSync'>
<Component Id='CmisSync.exe' Guid='bab5a922-b5c4-4958-ab79-5e303b767a61'>
<File Id='CmisSync.exe' Name='CmisSync.exe' Source='!(wix.root)\bin\CmisSync.exe' KeyPath='yes' DiskId='1' />
</Component>
[... other components ...]
<Directory Id='localeDirectoryFR' Name='fr'>
<Component Id='localeComponentFR' Guid='01612d5d-6c9d-46e9-96c5-7105bbbea7db'>
<CreateFolder />
<File Id='localeFileFR' Name='CmisSync.resources.dll' Source='!(wix.root)\bin\fr\CmisSync.resources.dll' DiskId='1' />
</Component>
</Directory>
<Directory Id='localeDirectoryJA' Name='ja'>
<Component Id='localeComponentJA' Guid='8d77c457-54b0-41d6-9f1c-c91338b25505'>
<CreateFolder />
<File Id='localeFileJA' Name='CmisSync.resources.dll' Source='!(wix.root)\bin\ja\CmisSync.resources.dll' DiskId='1' />
</Component>
</Directory>
Then I referenced them in the feature:
<Feature Id='CmisSyncFeature' Title='CmisSync' Description='CmisSync' Level='1' AllowAdvertise='no'>
<ComponentRef Id="CmisSync.exe" />
[... other componentrefs ...]
<ComponentRef Id="localeComponentFR" />
<ComponentRef Id="localeComponentJA" />
</Feature>
Thanks to Paul Lalonde for the tip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With