Home All Groups Group Topic Archive Search About

Not CLS-compliant warning...

Author
16 Oct 2006 5:22 PM
Glenn Palomar
Hi,

I just migrated my application to VS2005 and I get 2 warnings saying:

"Type of parameter 'app' is not CLS-compliant."

"Return type of function 'AppInventor' is not CLS-compliant."

Can anyone help me understand what these warning errors mean and how to fix?

Thanks for the usual help,
Glenn

Author
17 Oct 2006 12:16 PM
Jay B. Harlow
Glenn,
Normally the first thing I do when I see this is verify that I have:

    <Assembly: CLSCompliant(True)>

In my AssemblyInfo.vb file. This informs the VB compiler that all the types
in that assembly are CLS Compliant.

Then on a case by case basis I will add <CLSCompliant(False)> to respective
types and/or type members that I verify are not CLS Compliant.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemclscompliantattributeclasstopic.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWhatIsCommonLanguageSpecification.asp

--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"Glenn Palomar" <glenn.palo***@autodesk.com> wrote in message
news:uva44eU8GHA.4084@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I just migrated my application to VS2005 and I get 2 warnings saying:
>
> "Type of parameter 'app' is not CLS-compliant."
>
> "Return type of function 'AppInventor' is not CLS-compliant."
>
> Can anyone help me understand what these warning errors mean and how to
> fix?
>
> Thanks for the usual help,
> Glenn
>
>
Author
19 Oct 2006 8:19 PM
Glenn Palomar
Thanks for the input. I resolved the issue by specifying
CLSCompliant(False).

Glenn

Show quoteHide quote
"Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message
news:479B62CF-25BD-483E-879B-97A07FDD6C2C@microsoft.com...
> Glenn,
> Normally the first thing I do when I see this is verify that I have:
>
>    <Assembly: CLSCompliant(True)>
>
> In my AssemblyInfo.vb file. This informs the VB compiler that all the
> types in that assembly are CLS Compliant.
>
> Then on a case by case basis I will add <CLSCompliant(False)> to
> respective types and/or type members that I verify are not CLS Compliant.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemclscompliantattributeclasstopic.asp
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconWhatIsCommonLanguageSpecification.asp
>
> --
> Hope this helps
> Jay B. Harlow
> .NET Application Architect, Enthusiast, & Evangelist
> T.S. Bradley - http://www.tsbradley.net
>
>
> "Glenn Palomar" <glenn.palo***@autodesk.com> wrote in message
> news:uva44eU8GHA.4084@TK2MSFTNGP05.phx.gbl...
>> Hi,
>>
>> I just migrated my application to VS2005 and I get 2 warnings saying:
>>
>> "Type of parameter 'app' is not CLS-compliant."
>>
>> "Return type of function 'AppInventor' is not CLS-compliant."
>>
>> Can anyone help me understand what these warning errors mean and how to
>> fix?
>>
>> Thanks for the usual help,
>> Glenn
>>
>>
>
Author
17 Oct 2006 7:23 PM
William LaMartin
I received a similar warning when I brought an xml file into my project.
There was a node name of Table in the file that caused a number of such
warnings.

On the warning line, look at the File column and you will see the file to
which it is referring.

Show quoteHide quote
"Glenn Palomar" <glenn.palo***@autodesk.com> wrote in message
news:uva44eU8GHA.4084@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I just migrated my application to VS2005 and I get 2 warnings saying:
>
> "Type of parameter 'app' is not CLS-compliant."
>
> "Return type of function 'AppInventor' is not CLS-compliant."
>
> Can anyone help me understand what these warning errors mean and how to
> fix?
>
> Thanks for the usual help,
> Glenn
>
>