microsoft / Dynamics365Commerce.Solutions

Repository for hosting the Dynamics 365 Commerce end to end sample solutions
Other
54 stars 26 forks source link

Allow include 3rd party files to HWS and Store Commerce extensions installers #25

Closed madyke closed 1 year ago

madyke commented 1 year ago

Discussed in https://github.com/microsoft/Dynamics365Commerce.Solutions/discussions/24

Originally posted by **alexeysolonets** December 18, 2022 Currently when creating HWS and Store Commerce extension installers, it is only possible to include .dll files to the extension installation package, for example, 3rd party drivers. However, some drivers require additional assets for their work. That was possible in the legacy Retail SDK, but not in the new model. Please add the ability to include any files to the extension installers.
madyke commented 1 year ago

This has been completed and will be backported to 9.42.

Including files can be done by using Content Include and setting CopyToOutputDirectory to either Always or PreserveNewest. Excluding files can be done by using HardwareStationExternalContentExcludeList.

<!-- In the HardwareStation Extension Project -->
<ItemGroup>
   <!-- Automatically included in the hardware station extension package like an external assembly -->
   <Content Include="MyFile.txt">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
   </Content>
   <Content Include="MyFile2.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
   </Content>
   <!-- Will not be included in the package due to the exclude list entry -->
   <HardwareStationExternalContentExcludeList Include="MyFile3.txt" />
   <Content Include="MyFile3.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
   </Content>
</ItemGroup>