ephemeral-mongo icon indicating copy to clipboard operation
ephemeral-mongo copied to clipboard

Two copies of files from the "ephemeralmongo5.runtime.win-x64" package in the publish directory

Open flibustier7seas opened this issue 10 months ago • 0 comments

After publishing the app, there are two copies of files from the 'ephemeralmongo5.runtime.win-x64' package in the output directory.

Reproducing steps

Environment:

  • OS: Windows 11
  • .NET SDK: 8.0.100
  1. Create a new project and install the EphemeralMongo5 package.
<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>netcoreapp3.1</TargetFramework>
    </PropertyGroup>

    <ItemGroup>
      <PackageReference Include="EphemeralMongo5" Version="1.1.3" />
    </ItemGroup>

</Project>
  1. Publish the project for win-x64
> dotnet publish -o .\publish -r win-x64

Actual behavior

There are two copies of attached files in the output directory.

Files structure:

  • .\publish
    • .\runtimes\win-x64\native\mongodb
      • .\bin
        • mongod.exe
        • mongoexport.exe
        • mongoimport.exe
      • .\community-server
        • LICENSE-Community.txt
        • ...
      • .\database-tools
        • ...
    • mongod.exe
    • mongoexport.exe
    • mongoimport.exe
    • LICENSE-Community.txt
    • ...

Expected behavior

Only one copy of the files in the output directory.

Additional

If publish the app for other OS, the error is happened.

dotnet publish -o publish -r linux-x64
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: 
Found multiple publish output files with the same relative path: 
  C:\Users\MyUserName\.nuget\packages\ephemeralmongo5.runtime.linux-x64\1.1.3\runtimes\linux-x64\native\mongodb\community-server\THIRD-PARTY-NOTICES, 
  C:\Users\MyUserName\.nuget\packages\ephemeralmongo5.runtime.linux-x64\1.1.3\runtimes\linux-x64\native\mongodb\database-tools\THIRD-PARTY-NOTICES, 
  C:\Users\MyUserName\.nuget\packages\ephemeralmongo5.runtime.linux-x64\1.1.3\runtimes\linux-x64\native\mongodb\community-server\version.txt, 
  C:\Users\MyUserName\.nuget\packages\ephemeralmongo5.runtime.linux-x64\1.1.3\runtimes\linux-x64\native\mongodb\database-tools\version.txt.

flibustier7seas avatar Apr 10 '24 14:04 flibustier7seas