Răspuns Suppress warning : Identifier '..' is not CLS-compliant_

  • Monday, May 14, 2012 2:03 PM
     
      Has Code
    I have close to 195 warnings on my DSL project relating to not being CLS-compliant even though the following attribute is set within the AssemblyInfo.cs within the DSL project. How do I suppress these warnings?
    [assembly: CLSCompliant(true)]


    Johnny Larue

All Replies

  • Tuesday, May 15, 2012 11:10 AM
    Owner
     
     Answered

    Actually it is the presence of CLSCompliant=true (the default for a DSL assembly) when you are not CLS compliant that is causing the warnings. One way that your assembly might have become non-CLS compliant is by adding properties to your domain model using non-CLS types such as sbyte, or unsigned integer types. The DSL Designer includes these in the list of standard types for properties, so you could easily do this without thinking about it.

    Assuming that you don't care about being CLS compliant setting CLSCompliant=false will prevent those warnings. Or you can suppress the warnings - see for example this posting

    HTH

    Blair