I maintain an old ASP.NET WebForms app written years ago by someone else. It appears that it was written using .NET 2. (I had to piece it together, because it wasn't a complete Visual Studio solution.) I updated it to .NET 4.5.2, which is the .NET Framework used here.
Now I'm getting this error on lots of pages:
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
In researching this error I came across this page: https://forums.asp.net/t/1147454.aspx?BC30506+Handles+clause+requires+a+WithEvents+variable+defined+in+the+containing+type+or+one+of+its+base+types+
However, the solution given has already been covered by the original developer. He defined the CodeFile and it inherits from AccessLogs. Here's the top of one page raising this error:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AccessLogs.aspx.vb" Inherits="AccessLogs" %>
And here's the beginning of the code behind:
Imports System.Configuration.ConfigurationManager Partial Public Class AccessLogs Inherits System.Web.UI.Page
What else could be the solution to this problem?