-
Notifications
You must be signed in to change notification settings - Fork 523
Open
Labels
Description
Describe the bug
When I dotnet publish project that references Microsoft.Azure.Cosmos package with -r linux-x64, all the files from runtimes\win-x64\native are always copied to output directory.
Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.targets:
<ItemGroup>
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\Microsoft.Azure.Cosmos.ServiceInterop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>Microsoft.Azure.Cosmos.ServiceInterop.dll</TargetPath>
<Visible>False</Visible>
</ContentWithTargetPath>
</ItemGroup>
Imo, it should be conditional only for win* RuntimeIdentifier or when building on Windows.
To Reproduce
dotnet publish project that references Microsoft.Azure.Cosmos package with -r linux-x64
Expected behavior
No Windows dlls, such as vcruntime140.dll in output directory,
Actual behavior
There are Windows dlls, such as vcruntime140.dll in output directory,
Environment summary
SDK Version: ---
OS: Windows