本文介绍了无法加载文件或程序集“System.Web.WebPages.Razor,版本= 2.0.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级包在MVC 3项目(ASP.net 4),并在该项目访问页面时,现在我收到以下错误消息:

In my web.config file, and in my application, I am referencing System.Web.WebPages.Razor v1.0.0.0:

I don't even know whether I could be using System.Web.WebPages.Razor v2.0.0.0 with .Net 4.

Now, how do I find out what is referencing System.Web.WebPages.Razor v2.0.0.0?

解决方案

Just read your exception stacktrace:

Calling assembly : Microsoft.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

So it seems that you are using the Microsoft.Web.Helpers which in turn depends on System.Web.WebPages.Razor, Version=2.0.0.0.

这篇关于无法加载文件或程序集“System.Web.WebPages.Razor,版本= 2.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-06 12:24