Caliburn.Micro.Screen is not CLS-compliant

Nov 5, 2010 at 6:12 PM

I am trying to clean out all of the warnings on a project I am working on, and one of them is the above message.  The only think I could see that was that some of the fields were the same except for casing (like Parent/parent) so I changed those, but I still get the message.


Nov 6, 2010 at 2:51 AM

I was able to resolve the warnings by using internal instead of public as the scope modifier.  Not really sure why this worked, but it did.


Nov 6, 2010 at 3:30 AM

Which things did you change to internal?

Nov 6, 2010 at 1:53 PM

In particular, my ViewModel class, which inherits from Caliburn.Micro.Screen.  There was nothing in Caliburn that I modified, just my subclasses.


Nov 6, 2010 at 2:47 PM

Well, I found a better solution which was to modify the line in AssemblyInfo of the Caliburn.Micro project to:

[assembly: System.CLSCompliant(true)]


    [assembly: CLSCompliant(true)]

The real question is does a Silverlight project need to be CLS Compliant.  I don't think so, but the VS 10 Templates includes this attribute which is how I ended up with it in my project.