Runtime: SqlDbType exists both in NetStandard and System.Data.SqlClient

Created on 17 May 2017  路  10Comments  路  Source: dotnet/runtime

When using SqlDbType in .NET Core 2.0 SqlDbType errors with:

image

The type exists both in System.Data.SqlClient and .NET Standard, so the Sql Client version probably has to be removed.

area-System.Data.SqlClient bug

Most helpful comment

This is expected and a side-effect of moving some of the SQL Types (particularly to support DataTable) into netstandard. To fix you need to reference the latest version prerelease version of the SqlClient package when consuming it from a netstandard 2.0 project.

All 10 comments

@weshaggard @danmosemsft any advice?

This is expected and a side-effect of moving some of the SQL Types (particularly to support DataTable) into netstandard. To fix you need to reference the latest version prerelease version of the SqlClient package when consuming it from a netstandard 2.0 project.

OK, that makes sense to me. Closing as addressed.
@RickStrahl if you disagree or if you have more concerns regarding the end-to-end behavior, please let us know ASAP and we can reopen & continue the discussion. Thanks!

Looks good with preview package (4.4.0-preview1-25305-02). Thank you.

Only outstanding issue on the System.Data bits for me is DbProviderFactories - Quite a few places where this breaks for me. Specifically GetFactory().

That should be addressed in PR dotnet/runtime#21731 by @FransBouma. If you think there's more, please let us know ASAP.

@karelz @RickStrahl DbProviderFactories is planned for today. I'll add that to the PR dotnet/runtime#21732, as the line of code in that PR is solely there because of that class.

@karelz dotnet/runtime#21731 and dotnet/runtime#21732 are both needed for DbProviderFactories, hence I added them. One is labeled for 2.0.0 (#19825) and one is labeled for 2.1.0 (#19826). I know you all are swamped right now, hence my plan to commit to 19826, or is it better to commit to 19825? As one will make it be added 2.0.0 and the other will make it be delayed to 2.1.0...

@saurabh500 can you please advise which change is must-have for 2.0 and how best to move forward here?

This is expected and a side-effect of moving some of the SQL Types (particularly to support DataTable) into netstandard. To fix you need to reference the latest version prerelease version of the SqlClient package when consuming it from a netstandard 2.0 project.

It's Q2 2019 and I still need to use a prelease to fix this issue. What's going on here?

@6heads which package version are you referencing?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Timovzl picture Timovzl  路  3Comments

matty-hall picture matty-hall  路  3Comments

v0l picture v0l  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

omajid picture omajid  路  3Comments