- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我经历了很多之前已经回答过的答案,但是我很不幸运地找到了解决我问题的方法。这无法加载文件或程序集'System.Web.WebPages.Razor,版本= 3.0.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35'和我使用的许多其他文件。
****这是运行时错误:****
无法加载文件或程序集'System.Web.WebPages.Razor,版本= 3.0.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
1 methods, Func
1 setHostingEnvironmentCultures)+613
**This is the portion of my Web.Config**
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebMatrix.WebData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebMatrix.Data" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
I verified the version of each on Reference are the same as on Web.Config. Please help me. Thank you for your help.
最佳答案
您在web.config中具有此绑定重定向,其中提到正在使用Razor 2.0而不是Razor 3.0,并且您尝试使用不绑定任何内容的Razor 3.0程序集:
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
Views
文件夹中的web.config中:
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
-reinstall
开关)重新安装所需的软件包,然后执行上述步骤:
Update-Package –reinstall Microsoft.AspNet.WebPages
Update-Package -reinstall Microsoft.AspNet.Razor
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
关于asp.net-mvc - 无法加载文件或程序集'System.Web.WebPages.Razor,Version = 3.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'ASP.NET MVC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46396243/
这是我的解释器的代码: program=list(raw_input('Program: ')) array = [0 for i in range(100)] pointer=0 prgpointe
我写了简单的 brainfuck2c 翻译器。我添加了轻微的优化(针对指针移动),但我考虑优化加法/减法,例如我们有像 ++++ 这样的代码,它会转换为 mem[0]+= 1;内存[0]+=1;内存[
我正在寻找用深奥的语言 brainf*** 将伪随机数分配给存储单元的代码。我找到了 this sample code ,但发现它有些困惑。据我所知,这是一个“需要一些组装”(不是双关语?)样本。运行
我有一个Solr实例,其中包含文档,文档的'startTime'字段范围从上个月到现在为止。我想添加一个增强查询/函数来增强其startTime字段接近当前时间的文档的分数。 到目前为止,我已经看到了
我有一个包含字节序列 c3 82 c2 bf 的文本数据源。在上下文中,我认为它应该是大写的希腊 Phi 符号 (Φ)。 无论如何,我无法弄清楚正在使用什么编码;我正在编写一个 Python 脚本来处
我读过很多关于使用 SIFT 和蛮力匹配将一张图像与多张图像进行匹配的问题,例如 this和 this .是否可以进行多对一的匹配?我想做的是以下内容。 遍历目录中的查询图像 为每个图像提取 SIFT
我正在尝试使用 Microsoft Bing API。 $data = file_get_contents("http://api.microsofttranslator.com/V2/Ajax.sv
我正在使用第三方软件,它以加密模式 CBC 和 IV 为 0xFFFFFFFFFFFFFFFF 在河豚中创建 key 。如何将这样的 IV 传递给 openssl_encrypt?源字符串的编码是 w
我的一个项目中有一堆 JSON 文件设置为 Embedded resource。我正在使用 Newtonsoft.Json 来解析这些文件: public static string ReadStri
我是一名优秀的程序员,十分优秀!