XTypedElement.Clone() is not CLS-Compliant

Jun 11, 2010 at 6:46 PM

Much to my dismay I've spent the better part of my morning attempting to get Linq to XSD working properly. I've tried all sorts of things, but whenever my assembly is marked CLSCompliant, I am unable to use LINQ to XSD. I get a pair of errors for each entity described in my XSD file. 

Warning as Error: 'www.myschema.xmlns.mytestns.MyTag': base type 'Xml.Schema.Linq.XTypedElement' is not CLS-compliant.

Wanring as Error: Return type of 'www.myschema.xmlns.mytestns.MyTag.Clone()' is not CLS-compliant

Any ideas?


I'm using Visual Studio 2008 SP1, if that helps.

Jun 22, 2010 at 2:50 AM

Which version of the LINQTOXSD are you using? Is it 2.X.X? If so then it targets .NET 4.0. For Visual Studio 2008 you should use 1.X.X.