1

I have created a vb.net application in VS2010 and added a service as a reference but when I built the app, reference.vb is throwing multiple errors.

"This is the error: Reference to a non-shared member requires an object reference"

However the same is running fine when I created a c# windows forms application.

<System.Xml.Serialization.XmlElementAttribute(Form:=**System**.Xml.Schema.XmlSchemaForm.Unqualified)>  _
    Public Property MESSAGE_V4() As String
        Get
            Return Me.mESSAGE_V4Field
        End Get
        Set
            Me.mESSAGE_V4Field = value
        End Set
    End Property

The references are already there so I am not sure where the issue is.

This is something new to me as I have never seen this issue before and could not find much help on Google as well. If anyone could help. Thanks in advance :)

Joy1979
  • 599
  • 5
  • 12
  • 23

1 Answers1

1

Finally after work around I found solution. It was easy from my end.

Just removed "=System." from reference.vb and application is running smooth.

From:

Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)

To:

Form:=Xml.Schema.XmlSchemaForm.Unqualified)

Thanks.

Joy1979
  • 599
  • 5
  • 12
  • 23