How to reference the Assembly in Visual Studio?

-1

I was trying to create an application that connects to a database. But the methods of SqlConnection.Open() , SqlConnection.State and SqlConnection.Close() are with errors all appear the message:

The type "Component" is defined in an assembly that is not referenced, you must add a reference to the assembly [...]

    
asked by anonymous 08.06.2017 / 04:43

1 answer

0

It is necessary to add the System.Data.dl file to your project.

Click dependencies, add and choose assembly .

    
08.06.2017 / 17:04