[英]Razor intellisense does not work in vs2013
The Razor intellisense stopped working in one MVC 4 project, and one project only on my pc. Razor intellisense停止在一个MVC 4项目中工作,而一个项目仅在我的PC上工作。 I use Visual Studio 2013 Professional. 我使用Visual Studio 2013专业版。 I know this is an issue that has happened to a lot of people before me. 我知道这是我之前很多人都遇到的问题。 I've tried many possible solutions, but the one that works for me has not been there yet... 我尝试了许多可能的解决方案,但尚未找到适合我的解决方案...
A list of what I tried so far: 到目前为止我尝试过的清单:
and probably I tried more which I can't remember right now. 可能我尝试了更多我不记得的尝试。 Does anyone have another solution/tip to solve this? 有没有人有其他解决方案/提示来解决这个问题?
Suggested answers for this post which didn't work either: 此帖子的建议答案也无效:
I've faced same kind of problem with different causes and solved as follow: 我遇到了各种原因不同的同类问题,并按以下方式解决:
Feature … cannot be used because it is not part of the ISO-2 C# language specification generally these kind of errors does not block compilation, but could be very annoying. 功能…不能使用,因为它不是ISO-2 C#语言规范的一部分,这些错误通常不会阻止编译,但可能会很烦人。 To solve this error I've added this segment in web.config (or in app.config if your project is not a web project) 为了解决此错误,我在web.config中添加了此段(如果您的项目不是Web项目,则在app.config中添加了此段)
<system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <!-- ASP.NET 4.0 Assemblies --> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </compilation> </system.web>
local assemblies : sometimes, when I've used external assemblies (for helpers eg) I've had to check for Copy Local = true in Project references. 本地程序集 :有时,当我使用外部程序集(例如用于帮助程序)时,我不得不在Project引用中检查Copy Local = true。
In all cases It could be needed to close/reopen VS to get the modification applied. 在所有情况下,都可能需要关闭/重新打开VS才能应用修改。 hope it helps 希望能帮助到你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.