Here is the WXS file content for copying the individual files
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="MergeRedirectFolder">
<Component Id="owcF3EB3D7C133F5B48E5859309ABDC2EE0" Guid="5a6040ae-b91e-47b6-8438-d9cd47fb947a">
<File Id="owfF3EB3D7C133F5B48E5859309ABDC2EE0"
Source="$(var.SourceDir)\api-ms-win-core-console-l1-1-0.dll" KeyPath="yes" />
</Component>
<Component Id="owcB0E3C7251F136710A0F11E0C18525364" Guid="f80e6202-0436-d488-52cf-827e37483096">
<File Id="owfB0E3C7251F136710A0F11E0C18525364"
Source="$(var.SourceDir)\api-ms-win-core-datetime-l1-1-0.dll" KeyPath="yes" />
</Component>
<Component Id="owc4B0AD9DF281D253C1207D4E82DEB0DD2" Guid="4ac4edbd-2c6a-8aed-125e-11237a36e4f8">
<File Id="owf0E5D53A7E23AE08AF9D984ADC41AC589"
Source="$(var.SourceDir)\publish\sos_amd64_amd64_4.6.26628.05.dll" KeyPath="yes" />
I have defined my source directory as follow
<?define SourceDir="..\..\Services\bin\Debug\netcoreapp2.1\win7-x64\"?>
How can I specify WIX to copy all files instead of specifying one in each line?
Why?
My publish output files having different versions in different machines, so i do not want to hard code file versions in WIX configurations.
Publish folder has below files depend on the system it got published
In Dev machine, I have file sos_amd64_amd64_4.6.26725.06
In Build machine, I have file sos_amd64_amd64_4.6.26725.05
If you see the, the version is different in above files. So Wix build is failing due to mismatched version in *.wxs file. So I want to read all files from folder, rather than specifying individual files.