The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

CLS Compliance, Identifiers starting with underscore

Last post 10-11-2007, 5:51 PM by Mike.Griffin. 5 replies.
Sort Posts: Previous Next
  •  07-06-2007, 3:03 AM 3624

    CLS Compliance, Identifiers starting with underscore

    Hi,

     when you set [assembly: System.CLSCompliant(true)] in the assemblyinfo.cs, you get a warning for every "_UpToTable1ByFieldx" identifier.

    It is possible to avoid this by setting the attribute [CLSCompliant(false)] for every field starting with underscore but that means editing in the generated files. Is it possible to change the naming in MyGeneration? I don´t really like getting about 50 warnings everytime :)

     
    Joris
     

  •  07-06-2007, 3:33 AM 3627 in reply to 3624

    Re: CLS Compliance, Identifiers starting with underscore

    I will take a look at this, thanx, we're cutting our July 9th release this weekend, I'll see if I can get rid of all these for you. Yes

    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  07-18-2007, 8:52 PM 3928 in reply to 3624

    Re: CLS Compliance, Identifiers starting with underscore

    I'm now having the opposite problem:

    [CLSCompliant(false)] is causing the following warning everywhere it appears in my classes (63 warnings):  Warning 4 'EntitySpaces.ClassName._UpToClassName2ById' does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute

    I managed to work around this by adding: [assembly: CLSCompliant(false)] to my assembly.

    There probably should be an option in MyGeneration to skip CLSCompliance entirely for those of us not writing CLSCompliant code.  I'm thinking that should probably be the default actually.

  •  07-19-2007, 6:04 AM 3932 in reply to 3928

    Re: CLS Compliance, Identifiers starting with underscore

    Yes, I didn't realize that until after release, that is the danger of doing a last minute enhancement, something we will be very careful of in the future, the next version will come with a checkbox for that. Sorry about that, adding the assembly attribute however does get rid of it, assuming of course you don't have other violations laying around in the code.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  10-11-2007, 3:04 PM 5797 in reply to 3928

    Re: CLS Compliance, Identifiers starting with underscore

    agree..
  •  10-11-2007, 5:51 PM 5801 in reply to 5797

    Re: CLS Compliance, Identifiers starting with underscore

    Ya, we are either going to make this a conditional or remove it, I agree, it caused more problems than it solved.

    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML