Reputation: 59
using System;
using System.Data;
using System.Data.SqlClient;
...
I get the following error:
The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
I'm using Visual Studio 2013 Express for Windows Desktop
Upvotes: 4
Views: 29189
Reputation: 3
view > Object browser then select System.Data then add references in selected project IMAGE1
Upvotes: 0
Reputation: 3272
You are missing assembly reference. You need to add assembly reference.
Check out following images.
Go to soution explorer right click on references and select Add Reference.
then Select System.Data assemly reference.
That's it.
Press ok.
Press F6 to rebuild your project.
Upvotes: 11
Reputation: 3133
In the Solution Explorer
window of Visual Studio right click on your project, and click Add Reference
. There you can add assembly reference which are sometimes needed to use certain namespaces (like System.Data).
Upvotes: 0