分析器错误信息:文件'/TestSite/Default.aspx.cs'不存在 [英] Parser Error Message: The file '/TestSite/Default.aspx.cs' does not exist
问题描述
短篇小说。
这个网站是由我的一个朋友,谁也不知道这么多C#或ASP创建。并首次在VS 2K3创建。当我把它转换为VS 2K8这些错误开始突然出现,也有与编制等问题,我设法理清(似乎是释放VS 2K8想设计文件)
错误消息得到:
此请求提供服务所需资源的分析过程中出现错误。请检查下列特定分析错误详细信息并适当地修改源文件。
分析器错误信息:文件'/TestSite/Default.aspx.cs'不存在
源错误:
1号线:
<%@页面语言=C#的MasterPageFile =〜/ Site.master母AutoEventWireup =真
codeFILE =Default.aspx.cs继承=GuildStats._Default%GT;
2号线:
3号线:
< ASP:内容ID =内容1ContentPlaceHolderID =日程地址搜索Maincontent=服务器>
块引用>Defaults.aspx.cs
命名空间GuildStats
{
公共部分类_Default:System.Web.UI.Page
{Defaults.aspx
<%@页面语言=C#的MasterPageFile =〜/ Site.master母AutoEventWireup =真codeFILE =Default.aspx.cs继承= GuildStats._Default%GT;
Site.master.cs
命名空间GuildStats
{
公共部分类网站:System.Web.UI.MasterPage {}
}Site.master母
<%@主语言=C#AutoEventWireup =真codeFILE =Site.master.cs继承=GuildStats.Site%GT;
解决方案在
Default.aspx的
变更codeFILE
到codeBehind
。你或许会为做同样的Site.master母
。请参阅: codeFILE和code-背后
Short story. This site was created by a friend of mine, who did not know that much C# or asp. And was firstly created in VS 2k3. When i converted it to VS 2k8 these errors started to crop up, there was also other issues with compiling that i managed to sort out ( Seemed to be released to VS 2k8 wanted design files )
Error message gotten:
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" %>
解决方案In
Default.aspx
changeCodeFile
toCodeBehind
. You'll probably have to do the same for theSite.master
.这篇关于分析器错误信息:文件'/TestSite/Default.aspx.cs'不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!