Reputation: 1
On a C# project (.NET Framework 4.8) when I try to create a control SqlCommand using the designer I get the following error
Failed to create component 'SqlCommand'. The error message follows: 'System.invalidCastException: Unable to cast object of type 'Microsoft.Data.SqlClient.SqlCommand' to type 'System.Data.SqlClient.SqlCommand'.
The same problem appears with Microsoft.Data.SqlClient V3 and V2.1.3 and older.
All other controls like SQLDataAdapter are ok.
Thanks in advance for any suggestions.enter image description here
Upvotes: -1
Views: 125