How to get Microsoft.Data.SqlClient to work with DataSet Designer?

1.1k views Asked by At

Quite simply, how do you get Datasets Designer in visual studio to use Microsoft.Data.SqlClient as a provider?

I did the following in a NetStandard2.0 Project.

Add nuget Microsoft.Data.SqlClient
Add new Dataset to project.
Opened the dataset designer and added a new TableAdapter.
Set connection string etc and all the other bits. Designer then created the adapter.
Click the TableAdapter -> Properties -> Connection and I see the provider is System.Data.SqlClient
Changed System.Data.SqlClient to Microsoft.Data.SqlClient
Clicked Save and got the following error.

Property accessor 'DbObjectName' on object '' threw the following exception. 'Cannot obtain provider factory for data provider named 'Microsoft.Data.SqlClient'

0

There are 0 answers