在MVC剃刀页面给人以System.Web.Helpers编译错误没有被发现 [英] Razor pages in MVC are giving a compile error with System.Web.Helpers not being found
本文介绍了在MVC剃刀页面给人以System.Web.Helpers编译错误没有被发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Razor视图失败,错误如下编译:
My razor view is failing to compile with the following error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
我加入到我的项目的引用System.Web.Helpers,所以我不知道还有什么我需要做的。我也曾尝试添加引用,并没有变更后的干净的重建。
I have System.Web.Helpers added as a reference to my project, so I am not sure what else I need to do. I have also tried a clean rebuild after adding the reference, and no change.
我是什么失踪?
推荐答案
啊哈了它。我需要添加
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
到&LT;&集会GT; <!/ code> web.config中的部分
To the <assemblies>
section of web.config!
这篇关于在MVC剃刀页面给人以System.Web.Helpers编译错误没有被发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文