Skip to content

SQLCommand Error on Visual Studio Designer (WinForms) #1110

@stavrinc

Description

@stavrinc

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.
SQLCOMMAND_ERROR

Thanks in advance for any suggestion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions