I have built and published a nuget package from a netStandard2.0 project containing unmanaged runtime specific dlls. I did this by adding following ItemGroup to my csproj file.
<ItemGroup>
<Content Include="x64\**" PackagePath="runtimes\win-x64\native" Visible="true" />
<Content Include="x86\**" PackagePath="runtimes\win-x86\native" Visible="true" />
</ItemGroup>
It creates me a nice nuget package with all may native dlls on board.
Then I reference the package in a WPF application (net48) and everything works as expected. When I build the project for x64, only the dlls from the runtimes\win-x64\native folder are copied to the projects build output directory. Same for x86. This is exactly what I want.
But when I publish the app as ClickOnce the unmanaged dll's are missing in the Application Files folder of the ClickOnce Installer.
All I get is a warning: MSB3331: Unable to apply publish properties for item "vcruntime140". (for the vcruntime140.dll as example)
Is there a way how I can get the native dll's into the ClickOnce installer?