MVC 4智能感知不工作的剃刀在Visual Studio 2010 [英] MVC 4 IntelliSense is not working in Razor in Visual Studio 2010

查看:125
本文介绍了MVC 4智能感知不工作的剃刀在Visual Studio 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2010与ASP.NET MVC4和剃刀语法的IntelliSense没有在应用程序的意见为我工作。

我该怎么办?


解决方案

另外从

报价

<一个href=\"http://sebnilsson.com/1091244048/making-mvc-3-razor-intellisense-work-after-installing-mvc-4-beta/\">http://sebnilsson.com/1091244048/making-mvc-3-razor-intellisense-work-after-installing-mvc-4-beta/


  

安装MVC 4 Beta版的智能感知打破了后
  剃刀意见MVC在Visual Studio 2010年3应用这是
  在释放注释说明,但没有人通常看的。


  
  

此时间的解决问题的方法在这些实际列出
  发行说明。您需要将明确说明的版本号
  在web.config中引用。


  
  

添加一个新的appSettings入境的显式声明的版本
  网页使用方法:


 &LT;&的appSettings GT;
     &LT;添加键=网页:版本值=1.0.0.0/&GT;
     &LT;! - ... - &GT;
 &LT; /的appSettings&GT;


  

然后,你必须编辑您的.csproj文件,你需要找到你的介绍人
  System.Web.WebPages和System.Web.Helpers,并确保他们有
  明确的版本号是这样的:


例如:

 &lt;参考包括=System.Web.WebPages,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35,的ProcessorArchitecture = MSIL/&GT;&lt;参考包括=System.Web.Helpers,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35,的ProcessorArchitecture = MSIL/&GT;

-


  

希望这将在解决
  MVC 4或者案件的最终版本是,要引用
  版本剃刀V1只是过于宽松的MVC 3项目。


还有一个类似的问题
<一href=\"http://stackoverflow.com/questions/10075821/mvc-3-visual-studio-2010-razor-model-intellisense-not-working\">MVC 3 Visual Studio 2010的刀片型号的智能感知不工作

此外,你可能需要安装 VS 2010 SP1

修改

另请参阅 必需更新本页结果
<一href=\"http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815\">http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815

I am using Visual Studio 2010 with ASP.NET MVC4 and the IntelliSense for Razor syntax is not working for me in the views for the application.

What can I do?

解决方案

Also Quoting from

http://sebnilsson.com/1091244048/making-mvc-3-razor-intellisense-work-after-installing-mvc-4-beta/

After installing the MVC 4 Beta the IntelliSense breaks for Razor-views in MVC 3-applications in Visual Studio 2010. This is stated in the release-notes, but nobody usually reads those.

This time the solution to the problem are actually listed in those release-notes. You need to the explicitly state the version-numbers of the references in your web.config.

Add a new appSettings-entry for explicitly stating the version of WebPages to use:

 <appSettings>
     <add key="webpages:Version" value="1.0.0.0"/>
     <!-- ... --> 
 </appSettings>

Then you have to edit your .csproj-file, where you need to find your references to System.Web.WebPages and System.Web.Helpers and makes sure they have the explicit version-numbers like this:

eg:

<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>  

<Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />

--

Hopefully this will be resolved in the final version of MVC 4 or maybe the case is that the references to versions in Razor v1 were just too loose in MVC 3-projects.

Also a similar question MVC 3 Visual Studio 2010 Razor Model intellisense not working

Also you may need to install VS 2010 SP1 .

Edit:

Also see Required updates on this page
http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815

这篇关于MVC 4智能感知不工作的剃刀在Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆