Mike Taulty's Blog
Bits and Bytes from Microsoft UK
ADO.NET Data Services and LINQ to SQL - Errors Generating Proxy Code with DataSvcUtil.exe
Mike Taulty's Blog

Mike's Badges

Follow on Twitter
View mike's profile on slideshare
Add to Technorati Favorites
CW Blog Awards

Something that I came across today - if you're trying to surface a LINQ to SQL data source via the latest build of ADO.NET Data Services and you're running datasvcutil.exe on the metadata of the service then you might find yourself with a whole bunch of errors.

Here's a sample of what I was getting this morning;

error 7001: Schema specified is not valid. Errors:
$metadata(0,0) : error 0005: The 'Namespace' attribute is invalid - The value ''  is invalid according to its datatype 'http://schemas.microsoft.com/ado/2006/04/
edm:TNamespaceName' - The Pattern constraint failed.

For me, I resolved this by just making sure that I revisited my DBML diagram for LINQ to SQL in Visual Studio and set the "Entity Namespace" property for code generation.

That is, click on the white-space of the diagram;

image

to make sure that you have the diagram rather than a particular entity set selected. Then hit F4 for the properties;

image

and give yourself a namespace and all the errors seem to go away reasonably quickly :-)


Posted Fri, Jun 13 2008 4:15 AM by mtaulty

Comments

Jason Haley wrote Interesting Finds: June 13, 2008
on Fri, Jun 13 2008 7:06 AM
(C) Mike Taulty, 2009. All rights reserved. The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems