Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with: using System.Data;

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

like image 825
Thematiq Avatar asked Dec 20 '22 14:12

Thematiq


1 Answers

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.enter image description here

That's it.

Press ok.

Press F6 to rebuild your project.

like image 57
Nirav Kamani Avatar answered Dec 22 '22 02:12

Nirav Kamani