gpt4 book ai didi

asp.net - 升级到 MVC 5.2.0.0 导致异常 "Method not found: ' Boolean System.Web.WebPages.BuildManagerWrapper.IsNonUpdateablePrecompiledApp”

转载 作者:行者123 更新时间:2023-12-02 17:36:46 31 4
gpt4 key购买 nike

我刚刚升级到 Mvc 5.2.0.0,当我在浏览器 (IE9) 中启动 Web 应用程序时,开始出现此异常:

[MissingMethodException: Method not found: 'Boolean System.Web.WebPages.BuildManagerWrapper.IsNonUpdateablePrecompiledApp(System.Web.Hosting.VirtualPathProvider, Microsoft.Internal.Web.Utils.IVirtualPathUtility)'.]

[堆栈跟踪被剪断]

来自this MSDN Forums link据我了解,它很可能是某个较旧版本的 System.Web.WebPages.dll 在“临时 ASP.NET 文件”文件夹中徘徊。我清理了临时 ASP.NET 文件文件夹,但没有效果。我已经清理并重建了解决方案,但没有运气。我还检查了对 DLL 的引用 - 它们都已正确更新。

我的 Web.config(相关部分)如下所示:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
</assemblyBinding>

最佳答案

重新安装 Microsoft ASP.NET Web Pages NuGet 包将解决您的问题:

Install-Package Microsoft.AspNet.WebPages

关于asp.net - 升级到 MVC 5.2.0.0 导致异常 "Method not found: ' Boolean System.Web.WebPages.BuildManagerWrapper.IsNonUpdateablePrecompiledApp”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25279024/

31 4 0
文章推荐: r - 错误 write_csv 认为 data.frame 不为 TRUE,而 write.csv 为 TRUE
文章推荐: TYPO3 Extbase switchableControllerActions
文章推荐: html - 在 中使用