Not CLS-compliant warning...

G

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
 
J

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/d...rlrfsystemclscompliantattributeclasstopic.asp

http://msdn.microsoft.com/library/d...ml/cpconWhatIsCommonLanguageSpecification.asp
 
W

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.
 
G

Glenn Palomar

Thanks for the input. I resolved the issue by specifying
CLSCompliant(False).

Glenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top