473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CLS Compliance

guy
I have a number of classes, none of which use non CLS Compliant data types.
These classes are compiled into an assembly.
however when using this assembly a function (for example) that returns one
of these classes gives a compiler warning "Return type of MyFunction is not
CLS compliant"
this occurs with every class in the assembly.

why is this?

--guy--
Feb 15 '06 #1
5 1552
guy
further to this, the project is VB2005, and has been upgraded from vb2003

"guy" wrote:
I have a number of classes, none of which use non CLS Compliant data types.
These classes are compiled into an assembly.
however when using this assembly a function (for example) that returns one
of these classes gives a compiler warning "Return type of MyFunction is not
CLS compliant"
this occurs with every class in the assembly.

why is this?

--guy--

Feb 15 '06 #2
guy
got it!

its because the code is migrated vb2003!

if i create a new project and copy/paste the code in evertything is fine!

--guy--
"guy" wrote:
further to this, the project is VB2005, and has been upgraded from vb2003

"guy" wrote:
I have a number of classes, none of which use non CLS Compliant data types.
These classes are compiled into an assembly.
however when using this assembly a function (for example) that returns one
of these classes gives a compiler warning "Return type of MyFunction is not
CLS compliant"
this occurs with every class in the assembly.

why is this?

--guy--

Feb 16 '06 #3
hi,
can someone explain why? Is it documented somewhere? because I plan on
migrating much much much code from VB2003 to VB2005 in a near future, so I
want to know if it's normal behavior or if there are precise cases where it
does that...

Thanks

ThunderMusic

"guy" <gu*@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
got it!

its because the code is migrated vb2003!

if i create a new project and copy/paste the code in evertything is fine!

--guy--
"guy" wrote:
further to this, the project is VB2005, and has been upgraded from vb2003

"guy" wrote:
> I have a number of classes, none of which use non CLS Compliant data
> types.
> These classes are compiled into an assembly.
> however when using this assembly a function (for example) that returns
> one
> of these classes gives a compiler warning "Return type of MyFunction is
> not
> CLS compliant"
> this occurs with every class in the assembly.
>
> why is this?
>
> --guy--

Feb 16 '06 #4
guy
Hi,
i cant explain it but...

Note The current Microsoft Visual Basic compiler intentionally does not
generate a CLS-compliance warning, however, a future release of the compiler
will issue that warning.

from:-
http://msdn.microsoft.com/library/de...classtopic.asp

wether this is significant i dont know.

basically what i did intitally was create a vb2005 project and add in a vb
2003 vb class file this project referenced some vb 2005 assemblies, all of
which then appeared as non cls compliant.

for the second attempt i created another vb2005 project, created an empty
class file and pasted in the code from the vb2003 class, then set up the
references and all was fine!

a colleague has experienced identical problems

it ***might*** be something to do with referncing the vb2005 assemblies, buy
i havent tried this.
looking at posts on the net this seems a common problem, but i havent seen
an explanation:-(

hth

---guy---

"ThunderMusic" wrote:
hi,
can someone explain why? Is it documented somewhere? because I plan on
migrating much much much code from VB2003 to VB2005 in a near future, so I
want to know if it's normal behavior or if there are precise cases where it
does that...

Thanks

ThunderMusic

"guy" <gu*@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
got it!

its because the code is migrated vb2003!

if i create a new project and copy/paste the code in evertything is fine!

--guy--
"guy" wrote:
further to this, the project is VB2005, and has been upgraded from vb2003

"guy" wrote:

> I have a number of classes, none of which use non CLS Compliant data
> types.
> These classes are compiled into an assembly.
> however when using this assembly a function (for example) that returns
> one
> of these classes gives a compiler warning "Return type of MyFunction is
> not
> CLS compliant"
> this occurs with every class in the assembly.
>
> why is this?
>
> --guy--


Feb 16 '06 #5
thanks a lot... it will probably save me some time to know at least one way
to solve the problem.
"guy" <gu*@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Hi,
i cant explain it but...

Note The current Microsoft Visual Basic compiler intentionally does not
generate a CLS-compliance warning, however, a future release of the
compiler
will issue that warning.

from:-
http://msdn.microsoft.com/library/de...classtopic.asp

wether this is significant i dont know.

basically what i did intitally was create a vb2005 project and add in a vb
2003 vb class file this project referenced some vb 2005 assemblies, all of
which then appeared as non cls compliant.

for the second attempt i created another vb2005 project, created an empty
class file and pasted in the code from the vb2003 class, then set up the
references and all was fine!

a colleague has experienced identical problems

it ***might*** be something to do with referncing the vb2005 assemblies,
buy
i havent tried this.
looking at posts on the net this seems a common problem, but i havent seen
an explanation:-(

hth

---guy---

"ThunderMusic" wrote:
hi,
can someone explain why? Is it documented somewhere? because I plan on
migrating much much much code from VB2003 to VB2005 in a near future, so
I
want to know if it's normal behavior or if there are precise cases where
it
does that...

Thanks

ThunderMusic

"guy" <gu*@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
> got it!
>
> its because the code is migrated vb2003!
>
> if i create a new project and copy/paste the code in evertything is
> fine!
>
> --guy--
>
>
> "guy" wrote:
>
>> further to this, the project is VB2005, and has been upgraded from
>> vb2003
>>
>> "guy" wrote:
>>
>> > I have a number of classes, none of which use non CLS Compliant data
>> > types.
>> > These classes are compiled into an assembly.
>> > however when using this assembly a function (for example) that
>> > returns
>> > one
>> > of these classes gives a compiler warning "Return type of MyFunction
>> > is
>> > not
>> > CLS compliant"
>> > this occurs with every class in the assembly.
>> >
>> > why is this?
>> >
>> > --guy--


Feb 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
100
by: Roose | last post by:
Just to make a tangential point here, in case anyone new to C doesn't understand what all these flame wars are about. Shorthand title: "My boss would fire me if I wrote 100% ANSI C code" We...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.