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

Microsoft.SqlServer.Server.SqlDataRecord defined in multiple assemblies #6

Closed
mgravell opened this issue May 10, 2019 · 4 comments
Closed
Labels
2️⃣ Duplicate Issue/PR that is a duplicate and already exists.

Comments

@mgravell
Copy link
Member

mgravell commented May 10, 2019

Error CS0433 The type 'SqlDataRecord' exists in both 'Microsoft.Data.SqlClient, Version=1.0.19128.1, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' and 'System.Data.SqlClient, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Any code that indirectly takes both those libs - which could be anything - becomes largely broken. Suggest it needs a new name (edit: or namespace) in the new lib.

The other solution is extern alias, which a: almost nobody knows how to use, b: doesn't work via reflection find, and c: can't be configured via nuget, which everyone uses these days.

@mgravell
Copy link
Member Author

edit: also, SqlMetaData

I suggest adding a unit test that builds a tree of all type names and compares them for matches. Anything that matches including the namespace is going to be a major PITA, unless you're actually doing type-forwarding, but: type-forwarding requires you to rebuild and redeploy the old assembly.

@NickCraver
Copy link
Member

On the flip side, changing these makes migration to Microsoft.Data.SqlClient potentially expensive and viral. I'm curious to hear intent here, what's the goal - are these intentionally matching today? With transitive dependencies, matching types are absolutely going to break in very confusing ways for users...but goals would help advise on what out best path is.

@MarcoRossignoli
Copy link
Member

dup #4?

@mgravell
Copy link
Member Author

@MarcoRossignoli good spot; I'll close this and chime in there

@David-Engel David-Engel added the 2️⃣ Duplicate Issue/PR that is a duplicate and already exists. label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2️⃣ Duplicate Issue/PR that is a duplicate and already exists.
Projects
None yet
Development

No branches or pull requests

4 participants