I'm trying to upgrade from VS2008 to VS2019.
I've created a web application and referenced a class library that contains several classes. I keep getting an error BC30451 in a web form when trying to reference a class in the class library. In the Solution Explorer I see the referenced class "JBHClass1" which contains the class ShoppingCart.vb.
Here's the code that throws the error:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
itemtotal = ShoppingCart.Instance.GetItemTotal()
If Session("ID") Is "-1" Then
If Not IsNothing(Request.QueryString("id")) Then
LblSiteID.Text = Request.QueryString("id")
End If
Else
LblSiteID.Text = Session("ID")
End If
Me.FillForm(LblSiteID.Text)
Session("ID") = 0
End If
End Sub
Error:Severity Code Description Project File Line Suppression State Error BC30451 'ShoppingCart' is not declared. It may be inaccessible due to its protection level. WebApplication1 C:\Users\Owner\source\repos\WebApplication1\WebApplication1\Products\Products.aspx.vb 25 Active