Web Visual Developer 2010 doesn't recognise namespace System.Data

I've installed Web Visual Developer 2010 Beta plus Silverlight SDK and Tools and have started a Silverlight app in C#. All has been fine up to now but now I'm starting with the DB section it doesn't recognise namespace System.Data

The error is:
The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
ChrisJonesLycosAsked:
Who is Participating?
 
ChrisJonesLycosConnect With a Mentor Author Commented:
Actually I think I might have solved it. It's to do with the (unspoken) philosophy of Microsoft on this one.

I've just created a new Silverlight project that uses a Web Service to provide the data for a Silverlight based client. In the client part you can't add System.Data, in the Web Service you can.

Obviously the thinking is that the client is exactly that, just a client, and it shouldn't have access directly to data - unless you want to statically code it in or through one of the simple file access methods.

I would love to see a website (or even a good old fashioned book) where all these things were explained. Anyone know of one?
0
 
Bob LearnedCommented:
1) The RTM version should be available, now that 2010 was released yesterday.

2) Usually, when you can't find a namespace, it is because there isn't a reference to the .dll added to the project.  You should be able to "Add Reference", and select the System.Data.dll, and then be able to use that namespace.
0
 
ChrisJonesLycosAuthor Commented:
Have you any idea where the System.Data.dll is located? I can find only one and it is in a very obscure folder.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
Bob LearnedCommented:
System.Data should be in the Global Assembly Cache (GAC), and should be available in the "Add Reference" dialog.
0
 
ChrisJonesLycosAuthor Commented:
Unfortunately it's not there then. Could it be that either VWD 10 or VWD 10 no longer use this namespace. I've noticed lots of differences between VWD 10 and the examples I'm following in VWD 8. But this seems pretty fundamental.
0
 
ChrisJonesLycosAuthor Commented:
[Corrected] Unfortunately it's not there then. Could it be that either VWD 10 or VWD 10 beta no longer use this namespace? I've noticed lots of differences between VWD 10 and the examples I'm following in VWD 8. But this seems pretty fundamental.
0
 
Bob LearnedCommented:
System.Data.dll is a crucial part of the .NET framework, so it should be there.  The root for the file stored in the GAC is %SystemRoot%\Microsoft.NET\Framework\v4.0.30319.

Here is an attached image of the files in that folder, with System.Data.dll highlighted.  BTW, I don't have Visual Web Developer (I have VS.NET Ultimate RTM version, which includes that piece), but that shouldn't matter with this particular DLL.


Screenshot.png
0
 
guru_samiCommented:
Thought to see whats going on...so I created an silverlightApplication in VWD2010(RTM)...and tried to add a reference to System.Data but it is no longer under .NET tab..i.e. GAC....So I went to my gac folder
C:\Windows\assembly and none  of the 4.0 assemblies are listed there...

As TheLearnedOne: suggested I went to main root C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and it was there. But unfortunately I wasn't able to add System.Data dll....

This is the first ever Silverlight project I created and for now I don't know how it works...so can't explain what is going on...
0
 
ChrisJonesLycosAuthor Commented:
Yes, I've basically done the same. System.Data isn't there when you right click, Add Reference in the Solutions box. If I choose to browse to file and go to C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319, find System.Data and try to add it, it says this is the wrong version of .NET Framework. I removed all previous versions of .NET when I installed Silverlight just so I had the version Silverlight specified. So I'm not sure what's going on.

0
 
Bob LearnedCommented:
I don't work with Silverlight enough, yet, to know that one, but I guess that I have learned it now.  I don't know of any web site where that would be explained.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.