How to fix "type or namespace services does not exist in the namespace system.data" problem How to fix "type or namespace services does not exist in the namespace system.data" problem

How to fix “type or namespace services does not exist in the namespace system.data” problem

The Problem

'Data Model Template - Excel spreadsheet' photo (c) 2009, IvanWalsh.com - license: http://creativecommons.org/licenses/by/2.0/
the cause is that you are using .net 4.0 code in a 4.5 project, to solve, just go to add reference, search type in system.data.services, et al and add them manuallyYou create a new .net framework 4.5 solution in Visual Studio 2012 and you start to use some sample code from the Windows Azure Data Market. You attempt to compile and you get the “type or namespace services does not exist in the namespace system.data” and your service will not compile.

The Cause

For whatever reason, System.Data.Services does not come over automatically when you create the solution. It seems that System.Data is in .net 4.5, but System.Data.Services is .net 4.0. The fix for this was so easy I never bothered to look into it further.

The Solution

Just right click on the solution, and “Add Reference”, and then type in System.Data.Services, it will appear and just select it. Bada bing, problem solved.

 

Written By Steve French

 

Leave a Reply

Your email address will not be published. Required fields are marked *






Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.