ASP.NET 母版页框架名称:值不能为空错误
我正在阅读一些 ASP.NET 教程,第一个教程是如何制作母版页。当我创建母版页时,出现错误:
Value cannot be null. Parameter name: frameworkName
它出现在我的母版页 (MasterPage.master) 的第一行,并且它是创建的默认页面 - 我根本没有修改它:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
有人可以告诉我吗frameworkName
参数是什么?如何消除此错误?仅供参考:我正在使用 Visual Studio 2010。
I'm going over some ASP.NET tutorials and the first one I'm looking at is how to make a Master Page. When I do create a master page, I get an error:
Value cannot be null. Parameter name: frameworkName
It occurs in the first line of my master page (MasterPage.master) and it's the default page that gets created- I haven't modified it at all:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
Could somebody tell me what is the frameworkName
parameter and how can I get rid of this error? FYI: I'm using Visual Studio 2010.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 VS 2010 中的一个错误:
您看到此错误的原因是 xaml 中存在您无法解析的程序集引用。与 .xaml 文件位于同一目录中的 startpage.csproj 。请将两者复制到新文件夹并在 VS 2010 中打开项目文件。这应该可以工作。
http:// connect.microsoft.com/VisualStudio/feedback/details/485162/edit-startpage-xaml-frameworkname-value-cannot-be-null
这是我当前拥有的主文件,所以我会检查是否缺少程序集? :
您还可以重新创建解决方案并导入到新的 .sln 文件中吗?
This is a bug in VS 2010:
The reason you are seeing this error is that there are assembly references in the xaml which you are failing to resolve. There is a startpage.csproj in the same directory as the .xaml file. Please copy both to the new folder and open the project file in VS 2010. This should work.
http://connect.microsoft.com/VisualStudio/feedback/details/485162/edit-startpage-xaml-frameworkname-value-cannot-be-null
Here is master file that I currently have, so I would check for missing assemblies?:
Can you also recreate the solution and import into the new .sln file ?
当我将基于文件的 ASP.NET Web 应用程序转换为 IIS 网站时,我遇到了此问题。经过几分钟尝试查看问题所在后,我决定关闭并重新打开此解决方案,问题就解决了。
I encountered this problem when I converted a file based asp.net web application to an IIS website. After several minutes of trying to see what was wrong, I decided to close and reopen this solution and that solved it.