Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Collision when using SkyApm.Diagnostics.MongoDB and MongoDB.Driver #601

Open
1 of 4 tasks
emilioziniades opened this issue Nov 19, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@emilioziniades
Copy link

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Bug

Using Dotnet 8 and SkyApm.Diagnostics.MongoDB Version 2.2.0.

When using MongoDB.Driver nuget with SkyApm.Diagnostics.MongoDB, there is a type collision for certain types. Steps to reproduce:

dotnet new console -o MongoTypeCollisions
cd MongoTypeCollisions
dotnet add package MongoDB.Driver --version 3.0.0
dotnet add package SkyApm.Diagnostics.MongoDB --version 2.2.0
echo "using MongoDB.Driver; CollectionNamespace collectionNamespace= new();" > Program.cs
dotnet build

I get the following error message:

/home/emilioz/personal/MongoTypeCollisions/Program.cs(1,23): error CS0433: The type 'CollectionNamespace' exists in both 'MongoDB.Driver.Core, Version=2.18.0.0, Culture=neutral, PublicKeyToken=null' and 'MongoDB
.Driver, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321' [/home/emilioz/personal/MongoTypeCollisions/MongoTypeCollisions.csproj]

I haven't looked at this codebase, but I suspect updating to MongoDB.Driver.Core 2.30.0 (the latest version) might fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant