I have inherited a VB.Net Web Application and I am having a weird issue compiling the code. I have recently patched the environment to VS 2012 SP 1 Update 4 and I am still having a problem.
Within a class file I have the following snippet:
Imports Microsoft.VisualBasic
Public Class SessionState
Public Shared Property MEASearchResults As Data.DataSet
Get
Return HttpContext.Current.Session.Item("MEASearchResults")
End Get
Set(ByVal value As Data.DataSet)
If value Is Nothing Then
HttpContext.Current.Session.Remove("MEASearchResults")
Else
HttpContext.Current.Session.Item("MEASearchResults") = value
End If
End Set
End Property
and a bunch more code and the following:
Public Shared Property MEAModelRejectCostListResults As Data.DataSet
Get
Return HttpContext.Current.Session.Item("MEAModelRejectCostListResults")
End Get
Set(ByVal value As Data.DataSet)
If value Is Nothing Then
HttpContext.Current.Session.Remove("MEAModelRejectCostListResults")
Else
HttpContext.Current.Session.Item("MEAModelRejectCostListResults") = value
End If
End Set
End Property
The weird issue I am having is that on the second definition of the Property as a Data.Dataset I am getting a Type 'Data.DataSet' is not defined compiler error message.
The issue I find perplexing is that the same declaration at the top of class file compiles cleanly.
Also, if I try and add System to the References for this web project, I get an error message indicating "The Web Site is already referencing the assembly 'System'"
I'm kind of stumped, any ideas?