短篇小說。 這個網站是由我的一個朋友創建的,他不知道那麼多C#或asp。並且首先在VS 2k3中創建。當我把它轉化爲VS 2K8這些錯誤開始突然出現,也有與編制等問題,我設法理清(似乎被釋放到VS 2K8想設計文件)解析器錯誤消息:文件'/TestSite/Default.aspx.cs'不存在
錯誤信息得到:
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: The file '/TestSite/Default.aspx.cs' does not exist.
Source Error:
Line 1:
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="GuildStats._Default" %>
Line 2:
Line 3:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
Defaults.aspx.cs
namespace GuildStats
{
public partial class _Default : System.Web.UI.Page
{
Defaults.aspx
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="GuildStats._Default" %>
Site.master.cs
namespace GuildStats
{
public partial class Site : System.Web.UI.MasterPage { }
}
的Site.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="GuildStats.Site" %>
該鏈接如何解決此問題?它提到了CodeFile屬性,但沒有提到CodeBehind。 MSDN文檔聲明CodeBehind已經過時,所以我試圖找出爲什麼切換回CodeBehind是一個解決方案。 – 2009-10-16 17:49:59