An error occurred during the parsing of a resource required to service this request

I suddenly got this error in my ASP.NET Web Forms project in Visual Studio. Even after creating a new Web Form without content, I was thrown this error. The solution was very simple. All you have to do is rebuild your project.

Server Error in ‘/’ Application.


Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type ‘Listing’.

Source Error:

Line 1: <%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”8-8_Listing.aspx.cs” Inherits=”Listing” %> Line 2:
Line 3: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>


Source File: /8-8_Listing.aspx Line: 1