Allen Buckley's Blog
My experiences in .Net

CLS-compliant warnings from wizard generated Dataset

Saturday, July 22, 2006 9:56 PM

I used a wizard today to create a dataset (.xsd) and when I ran my web application I had hundreds of warnings in my newly generated dataset telling me my code was not CLS-compliant.  I checked out what CLS-compliant means and apparently this warning is new in VS 2005 and is used to check to see if your application is following CLS (Common Language Specifications).  In other words the CLS are a set of rules used to check if the code in one language can be used in another language.

 

I checked Google for an answer and only found a work around that turned the functionality of the CLS checking off.  I have been looking for another way to go about fixing this problem, but I haven’t found anything yet.  There has to be a reason why the dataset generated (by VS 2005) caused all of these errors.  Has anyone else gotten CLS warnings and fixed the problem without just turning off CLS checking?


Feedback

# re: CLS-compliant warnings from wizard generated Dataset

I also encountered the same problem. When i analaysed the dataset i could find that the problem was due to the names given for the columns in the dataset. There was balnk spaces before the column names, this was causing warnings in the designer.cs file. When i removed these balnk spaces from the column names the warnings got resolved without turning off CLS checking. Check it out and see if its the same issue. 9/18/2008 1:44 AM | srony

Post a comment