Discussion:
After Upgrading 1.1 Project to 2.0 --> _Class is not CLS-Compliant
(too old to reply)
Whiskey Romeo Lima
2009-11-14 18:24:02 UTC
Permalink
After Upgrading 1.1 to 2.0 using VS 2008 I get following warnings in the
Reference.vb file of webservice the project is referencing.

_Class is not CLS-Compliant
_ClassColumn is not CLS-Compliant
_Select is not CLS-Compliant

Here is an example of the first error:

'''<summary>
'''Represents strongly named DataRow class.
'''</summary>

<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
Partial Public Class tblCompClassRow
Inherits Global.System.Data.DataRow

Private tabletblCompClass As tblCompClassDataTable

<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
MyBase.New(rb)
Me.tabletblCompClass = CType(Me.Table,tblCompClassDataTable)
End Sub

<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property _Class() As String '<--WARNING HERE
Get
Return CType(Me(Me.tabletblCompClass._ClassColumn),String)
End Get
Set
Me(Me.tabletblCompClass._ClassColumn) = value
End Set
End Property
End Class

Since there is no recommended fix for this via Intellisense, what I am
expected to do here. This auto generated code.

WRL
Gregory A. Beamer
2009-11-17 15:36:29 UTC
Permalink
=?Utf-8?B?V2hpc2tleSBSb21lbyBMaW1h?=
Post by Whiskey Romeo Lima
Since there is no recommended fix for this via Intellisense, what I am
expected to do here. This auto generated code.
Before doing anything, make a copy of the DataSet's files. This is just
in case anything goes haywire. If you are using source control (always
wise), you do not need a separate copy.

Rebuild the DataSet and it should fix it. Or, if this is an internal
project, you can simply ignore the error.

One thing you might be able to do, as well, is right click on the file
and choose custom tool. I know this recalculates certain types of items.
not sure with DataSets.

And, one last possibility. Open the Dataset and select everything. Then
cut and save and paste and save. VS should rewrite the classes and fix
the compliance issue.

Peace and Grace,
Greg
--
Vote for Miranda's Christmas Story
http://tinyurl.com/mirandabelieve

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
Whiskey Romeo Lima
2009-12-04 21:44:05 UTC
Permalink
Greg,

Thanks for the reply. Sorry for my late reply but I am no longer getting
email notifications for some reason. So I have to remember to check back
manually.

I will give these suggestions a try.

WRL
Post by Gregory A. Beamer
=?Utf-8?B?V2hpc2tleSBSb21lbyBMaW1h?=
Post by Whiskey Romeo Lima
Since there is no recommended fix for this via Intellisense, what I am
expected to do here. This auto generated code.
Before doing anything, make a copy of the DataSet's files. This is just
in case anything goes haywire. If you are using source control (always
wise), you do not need a separate copy.
Rebuild the DataSet and it should fix it. Or, if this is an internal
project, you can simply ignore the error.
One thing you might be able to do, as well, is right click on the file
and choose custom tool. I know this recalculates certain types of items.
not sure with DataSets.
And, one last possibility. Open the Dataset and select everything. Then
cut and save and paste and save. VS should rewrite the classes and fix
the compliance issue.
Peace and Grace,
Greg
--
Vote for Miranda's Christmas Story
http://tinyurl.com/mirandabelieve
Blog: http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************
.
Loading...