2012-11-23 84 views

回答

8

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

而且引用在Visual Studio 2010这3应用程序安装MVC 4测试版 剃刀享有智能感知断裂处MVC后 在释放 - 说明笔记,但没有人通常读这些。

这次该问题的解决方案实际上列在那些 发行说明中。你需要在你的web.config中明确声明 引用的版本号。

添加新的appSettings进入了明确说明的 网页版的使用方法:

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

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

例如:

<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" /> 

-

希望这将在MVC 4 最终版本得到解决或可能的情况是,到 版本剃刀V1的引用是在短短太松MVC 3项目。

而且类似的问题 MVC 3 Visual Studio 2010 Razor Model intellisense not working

你也可能需要安装VS 2010 SP1

编辑

也看到这个页面
http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815

0

对我来说,问题就来了,在浏览\ web.config中我引用了MVC的旧版本上所需的更新 。 (我从V4将我的项目从V3迁移) 我更新了版本并重新启动,现在我已经具备了智能感知功能

相关问题