473,224 Members | 1,404 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,224 software developers and data experts.

Warning Msg: Name '_ClassColumn' is not CLS-compliant.

I converted a vb.1.1 web service project to 2.0 and .net 2.0 created /
replace some datasets. The code it automatiacly generated gets a warning
message as follows:

Warning 150 Name '_ClassColumn' is not CLS-compliant.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\wsvipn2006\4b065968\dadaeae0\Sources_App_Cod e\wsvipn2006.dsuser.xsd.8a6308fa.vb
2606 38 http://localhost/wsVIPN2006/

I'm trying to go through all my projects and to resolve all warnings after
converting to 2.0. How can I resolve this with out corrupting things?

--
mo*******@nospam.nospam
Dec 19 '05 #1
10 6127
Hi moondaddy,

If you double click on the warning, which line of code does the stops on?
Could you paste that part of code here?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 20 '05 #2
<System.Diagnostics.DebuggerNonUserCodeAttribute() > _ Public ReadOnly
Property _RegionColumn() As System.Data.DataColumn
Get
Return Me.column_Region
End Get
End Property

And here's the corisponding warning

Warning 151 Name '_RegionColumn' is not CLS-compliant.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\wsvipn2006\4b065968\dadaeae0\Sources_App_Cod e\wsvipn2006.dsuser.xsd.8a
6308fa.vb 2620 38 http://localhost/wsVIPN2006/

Thanks.

--
mo*******@nospam.nospam
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:iF*************@TK2MSFTNGXA02.phx.gbl...
Hi moondaddy,

If you double click on the warning, which line of code does the stops on?
Could you paste that part of code here?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 20 '05 #3
Moondaddy,

It can be that the code is created first as C#.

Have a look if the column_Region is maybe public/friend declared with the
same name somewhere but with an other upper/lower case. This is allowed in
C# but is not CLS compliant.

I hope this helps,

Cor
Dec 20 '05 #4
"moondaddy" <mo*******@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I converted a vb.1.1 web service project to 2.0 and .net 2.0 created /
replace some datasets. The code it automatiacly generated gets a warning
message as follows:

Warning 150 Name '_ClassColumn' is not CLS-compliant.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\wsvipn2006\4b065968\dadaeae0\Sources_App_Cod e\wsvipn2006.dsuser.xsd.8a6308fa.vb
2606 38 http://localhost/wsVIPN2006/

I'm trying to go through all my projects and to resolve all warnings after
converting to 2.0. How can I resolve this with out corrupting things?

I had a similar problem when upgrading. I'm not sure I understand what was
wrong completely, but it involved this line in my AssemblyInfo.vb file:

<Assembly: CLSCompliant(True)>

I decided to just delete the AssemblyInifo.vb file, since VB 2005 handles
this differently somehow(?). (New projects don't even have this file.) That
cleared up my problem. It seemed to me at the time maybe the default
CLSCompliant is False? (I never set it to True in my VB 2003 project, not
sure how it got that way.) I assume it is using some default when the
AssemblyInfo.vb is not present.

Maybe somebody more in the know can clue me in.

It seems to me there is a bigger issue here. I assume we would want this
set to True. But I also assume leaving things at their defaults (by
removing AssemblyInfo.vb) should be OK also.

Thoughts anyone?

Greg
Dec 20 '05 #5
Hi Greg,

Please check Cor's post. The member of the class might be different in case
but with the same characters.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 21 '05 #6
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:eq**************@TK2MSFTNGXA02.phx.gbl...
Hi Greg,

Please check Cor's post. The member of the class might be different in
case
but with the same characters.


I took another look at my upgraded project.

I see AssemblyInfo.vb file is still alive and well. (I had forgotten it is
now a hidden file under the My Project folder).

By default (in VB 2005), this line is not present:
<Assembly: CLSCompliant(True)>

It was present in my VB 2003 project (and appears to be the default for new
2003 projects). If I add it back I get the below warnings. If I delete it,
or set it to false, the warnings go away.

warning BC40031: Name '_mainConnection' is not CLS-compliant.
warning BC40031: Name '_rowsAffected' is not CLS-compliant.
warning BC40031: Name '_errorCode' is not CLS-compliant.
warning BC40031: Name '_mainConnectionIsCreatedLocal' is not CLS-compliant.
warning BC40031: Name '_mainConnectionProvider' is not CLS-compliant.

I don't see anything in my code that would suggest I have a casing problem
with these variables as suggested by Cor.

What I did determine is that if I create ANY variables Public or Protected
(but not Private) whose names starts with an underscore I get the warning.

example:
Protected _foobar as Integer

So my questions are:

#1 Why is the default to have <Assembly: CLSCompliant(False)> (apparently,
since the line is not present in AssemblyInfo.vb) ?
#2 Why is the default different than 2003?
#3 How do you change this now in VS 2005 IDE without editing the
AssemblyInfo.vb file manually?
#4 What is the problem with the underscore _ character with Public
variables? (I think I know this one, but want to hear other opinions)

Greg
Dec 21 '05 #7
Hi Greg,

Thanks for the exact warning message. A programming element can contain one
or more underscores, but to be compliant with the Common Language
Specification (CLS), it must not begin with an underscore. See Declared
Element Names.

You can check the following link for more information on this warning.

http://msdn2.microsoft.com/en-us/library/k5645wwb.aspx

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 22 '05 #8

Did you ever solve your 'is-compliant' issue because I'm receiving lots
of these warnings and even errors which should be warnings during my
conversion to 2005.

The leading underscore does not apply for me.

--
gaugdogg
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message2034812.html

Mar 15 '06 #9
I too have had naming problems related to conversion from 2003, where xsd
names were modified with underscore underscores inserted preceding the column
names. Apparently there is a compatibility issue here between 2003 and 2005.
If the Assembly.vb is modified what impact does that have in anything we do
with the project?
--
Thanks,
StanD
"moondaddy" wrote:
I converted a vb.1.1 web service project to 2.0 and .net 2.0 created /
replace some datasets. The code it automatiacly generated gets a warning
message as follows:

Warning 150 Name '_ClassColumn' is not CLS-compliant.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\wsvipn2006\4b065968\dadaeae0\Sources_App_Cod e\wsvipn2006.dsuser.xsd.8a6308fa.vb
2606 38 http://localhost/wsVIPN2006/

I'm trying to go through all my projects and to resolve all warnings after
converting to 2.0. How can I resolve this with out corrupting things?

--
mo*******@nospam.nospam

May 29 '06 #10
Hi Kevin,
I realize that I am responding to an early thread. but I would like some
guidance here.
I did not prefix my database column names, the 2003 ide was responsible.
There is apparently some incompatability issue with 2005. There were
mentioned that setting entry in the Assemblyinfo.vb to false would eliminate
the problem. Since this parameter was set false in vs2003, what are the
implications of setting this parameter false in vs2005?
--
Thanks,
StanD
"Kevin Yu [MSFT]" wrote:
Hi Greg,

Thanks for the exact warning message. A programming element can contain one
or more underscores, but to be compliant with the Common Language
Specification (CLS), it must not begin with an underscore. See Declared
Element Names.

You can check the following link for more information on this warning.

http://msdn2.microsoft.com/en-us/library/k5645wwb.aspx

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

May 30 '06 #11

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

Similar topics

2
by: Koen Van Herck | last post by:
For debugging/logging purposes, I have a function def Log(msg): print '%s.%s: %s' % (cls, method, msg) I call this function from a class method, and I would like to retrieve the name of the...
12
by: Fred Pacquier | last post by:
First off, sorry for this message-in-a-bottle-like post... I haven't been able to phrase my questions well enough to get a meaningful answer from Google in my research. OTOH, it is standard...
6
by: kermit | last post by:
I asp.net pages that run on an intranet IIS server. Some op the pages use XLM DOM doc.Load(sPath) to open and parse a XML file. Every time the doc.Load(sPath) executes in IE6 a warning message...
1
by: Mark | last post by:
Hello I was hoping to appeal to the gurus of the audience that may be able to contribute to resolving my problem I built a web reporting website in .NET using Crystal (God help me!) but I've...
1
by: Shapper | last post by:
Hello, I created a script to send an email from a contact form. Is it possible to send the name of the sender? I know I have the fields: mdg.From msg.To msg.Subject
2
by: ray well | last post by:
hi, when my client runs an app i'm developing for him he get the following msg =================== Open File - Security Warning The publisher could not be verified. Are you sure you want to...
5
by: nasse | last post by:
I am getting the following error msg whenever I try to login. I tried to turn my output_buffering = On in my php.ini but is not working for me. Would you please help me: Warning: Cannot modify...
2
by: EricDeWerth | last post by:
When I try to call db2move $todbname load from a shell script it will give me this error in the log. When I call it from the command line using the exact same dataset it works perfectly. Does...
5
by: ashitaka65 | last post by:
Hello, Im using DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 in a line of code to delete the current record but when I...
5
by: Cubicle Intern | last post by:
Hi, I have a form with multiple fields that confirmed before the form is submitted (ex. email field needs to be completed before the form can be submitted). Once the required fields are...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.