-1
I was trying to create an application that connects with a database. But the methods of SqlConnection.Open()
, SqlConnection.State
and SqlConnection.Close()
are with errors all appear the message:
The "Component" type is defined in an Assembly that is not referenced, you must add a reference to Assembly[...]
Dependencies => assemblies => right-click => add
– Jéf Bueno
You do not have "Add".
– Yuri Nascimento
In dependencies you must have. Somewhere you need to have this, just make a little effort you think.
– Jéf Bueno
I did, but how to know which dependency needs to be added?
– Yuri Nascimento
See my answer
– Jéf Bueno
Already solved your problem?
– Francisco
No, I gave up, created a new project and this error did not appear anymore.
– Yuri Nascimento