MongoDb.Driver 2.14.1 在共享项目(.Net SDK 6.0.101)中使用 MongoDb.Bson 时“包含重复的‘内容’项”

Phi*_*Näf 13 .net mongodb

使用 mongodb NuGets 进行项目设置:

  • 使用 MongoDb.Driver 和 MongoDb.Driver.Core 的后端项目
  • 与 Mongodb.Bson 共享项目(在后端引用!)

将 nugets 从2.13.3更新到2.14.1后,我收到以下构建错误:

Microsoft.NET.Sdk.DefaultItems.Shared.targets(213, 5):[NETSDK1022] Duplicate 'Content' items were included.
The .NET SDK includes 'Content' items from your project directory by default.
You can either remove these items from your project file, or set the 'EnableDefaultContentItems' property to 'false' if you want to explicitly include them in your project file.
For more information, see https://aka.ms/sdkimplicititems.

The duplicate items were:
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\win\native\libzstd.dll'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\win\native\snappy32.dll'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\win\native\snappy64.dll'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\linux\native\libsnappy64.so'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\linux\native\libzstd.so'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\osx\native\libsnappy64.dylib'
'C:\Users\**\.nuget\packages\mongodb.driver.core\2.14.1\build\..\runtimes\osx\native\libzstd.dylib'
Run Code Online (Sandbox Code Playgroud)

回滚到2.13.3解决了该问题。这是一个错误,还是有人知道这里出了什么问题?

Ili*_*lia 1

似乎解决这个问题的第一个版本是2.18.0.