无法加载文件或程序集“System.Web.WebPages” [英] Could not load file or assembly 'System.Web.WebPages'
问题描述
我以前有这个问题,但后来所有我需要做的就是清理和重建项目。现在,似乎没有再工作。当我开始我的Asp.Net MVC3项目调试器,该网站是在我的浏览器中打开。而不是让浏览器psented第一页$ P $的,我得到这个错误
I've had this problem before, but then all i needed to do was to clean and rebuild the project. Now that doesnt seem to work anymore. When i start my Asp.Net MVC3 project debugger, the site is opened in my browser. Instead of getting the first page presented in the browser, i get this error
Parser Error Message: Could not load file or assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 31: <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 32: <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 33: <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 34: </assemblies>
Line 35: </compilation>
我似乎无法弄清楚如何解决这个问题。任何想法?
I can't seem to figure out how to solve this. Any idea?
推荐答案
我有这个问题。也许当我安装.NET MVC V4在MVC V3的顶部,而不是肯定的。
I had this problem. Maybe it occurred when I installed .NET MVC v4 over the top of MVC v3, not sure.
无论如何,我删除了我的项目 System.Web.WebPages
引用。然后在添加引用对话框.net选项卡上有列出了两个System.Web.WebPages参考,版本1.0.0.0和2.0.0.0一个。我确定添加的版本1.0.0.0一个作为那是失踪的人。
Anyway I removed the System.Web.WebPages
reference from my project. Then in the Add Reference dialogue .NET tab there were two System.Web.WebPages references listed, a version 1.0.0.0 and a 2.0.0.0. I made sure to add the version 1.0.0.0 one as that was the one that was missing.
这篇关于无法加载文件或程序集“System.Web.WebPages”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!