VisualStudio.17.Release/17.4.4+33213.308
Microsoft .NET Framework
Version 4.8.04084
.NET version
4.8
Did this work in a previous version of Visual Studio and/or previous .NET release?
no
Issue description
i am trying to move from "System.Data.SqlClient" to "Microsoft.Data.SqlClient",
and all my code is working,
but when i change the dataset autogenerated code to use the new "Microsoft.Data.SqlClient.SqlDataAdapter"
it works, but when adding any new tables or changing the fields in the dataset designer, it returns the "SqlDataAdapter" to use:
"System.Data.SqlClient.SqlDataAdapter"
so how to make the designer stay using the new "Microsoft.Data.SqlClient.SqlDataAdapter".
and this is also happening to:
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
private global::System.Data.SqlClient.SqlConnection _connection;
private global::System.Data.SqlClient.SqlTransaction _transaction;
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
/// <summary>
///Represents the connection and commands used to retrieve and save data.
///</summary>
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
[global::System.ComponentModel.ToolboxItem(true)]
[global::System.ComponentModel.DataObjectAttribute(true)]
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class MetaObjectTableAdapter : global::System.ComponentModel.Component {
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
private global::System.Data.SqlClient.SqlConnection _connection;
private global::System.Data.SqlClient.SqlTransaction _transaction;
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
Steps to reproduce
create a new winforms solution
add a dataset from sql server tables.
the compile it.
then add nuget "Microsoft.Data.SqlClient"
and replace all references of "Microsoft.Data.SqlClient" to "System.Data.SqlClient"
save and re-compile.
then open the dataset in designer mode, and add to it a new table from sql server.
save it.
go to the Dataset code, and u will see that it returned to the old: "System.Data.SqlClient"
Environment
VisualStudio.17.Release/17.4.4+33213.308 Microsoft .NET Framework Version 4.8.04084
.NET version
4.8
Did this work in a previous version of Visual Studio and/or previous .NET release?
no
Issue description
i am trying to move from "System.Data.SqlClient" to "Microsoft.Data.SqlClient", and all my code is working, but when i change the dataset autogenerated code to use the new "Microsoft.Data.SqlClient.SqlDataAdapter" it works, but when adding any new tables or changing the fields in the dataset designer, it returns the "SqlDataAdapter" to use: "System.Data.SqlClient.SqlDataAdapter" so how to make the designer stay using the new "Microsoft.Data.SqlClient.SqlDataAdapter". and this is also happening to: private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
e.g.: namespace MetaObjectDAL.DS_FormsTableAdapters {
Steps to reproduce
create a new winforms solution add a dataset from sql server tables. the compile it. then add nuget "Microsoft.Data.SqlClient" and replace all references of "Microsoft.Data.SqlClient" to "System.Data.SqlClient" save and re-compile.
then open the dataset in designer mode, and add to it a new table from sql server. save it. go to the Dataset code, and u will see that it returned to the old: "System.Data.SqlClient"
Diagnostics
No response