I'm trying to build my first ASP.NET Web Forms project but I'm facing some serious problem.
I created two project files in my project named: BLL and DAL.
I created classes named class.cs
and class1.cs
in both the above files respectively. When I add using System.Data;
in any of the .cs
files, it displays the following errors:
1: Error CS0234 The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) DAL..NET Platform 5.4
2. Error CS0234 The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) BLL..NET Platform 5.4
I tried adding assembly references by right click on references -> Add reference -> Checking System.Data
and rebuilding it again but it didn't help me.
When I hover mouse over using System.Data;
it displays the following thing:
First when you hover your "System.Data" it shows a message, which is pretty much straight forward to understand that you haven't used any classes of System.Data. When you implement those classes, this message will disappear.
Second, You got an error -
Error CS0234 The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) DAL..NET Platform 5.4
So basically you have to have an assembly refernce of System.Data into your project.
Go to References and check whether System.Data Assembly exist or not. If not then install it.
Hope this will help you.
You are simply missing the "System.Data" reference.
In Solutions Explorer window right click on the 'Reference' entry -> Press Add Reference -> click on Assemblies > Search for 'System.Data' -> press the check box ( I always forget this step.) -> press OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With