My wix wxs has a CustomAction written by c++: HSRInstall.dll. Inside this dll, windows swdevice.lib, new.lib are linked. So it requires running with vcruntime140.dll. When user execute this msi package on a clean install windows server 2019 datacenter, without a vcruntime140.dll in C:\Windows\System32, it will fail to be installed.
<Binary Id="HSRInstalldll" SourceFile="HSRInstall.dll" />
<CustomAction Id="deletehsrservicecache" BinaryKey="HSRInstalldll" DllEntry="HSRCustomAction" Execute="deferred" Impersonate="no" Return="ignore" />
When I add vcruntime140.dll as binary element in wxs, its file name is changed when installing. How to add the vcruntime library that the dynamic library depends on to the wix package? Thanks!