MVC3 项目中 VS2013 中的有限 Intelliesense [英] Limited Intelliesense in VS2013 on MVC3 project

查看:13
本文介绍了MVC3 项目中 VS2013 中的有限 Intelliesense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了 vs 2013 Professional 并在其中打开了我的一个副项目应用程序.该项目是一个使用 razor 视图引擎的 MVC3 应用程序.我注意到在编辑视图 (cshtml) 时,我无法访问我在 2012 年习惯的智能感知.我立即注意到的 2 个示例是 @Url.Content() 和 @Viewbag.代码仍然可以编译和运行,只是没有智能感知.稍微弄乱了它之后,我想我应该检查升级日志,果然我发现......

I recently installed vs 2013 professional and opened one of my side project applications in it . The project is an MVC3 application using the razor view engine. I noticed that when editing a view (cshtml ) I wasn't getting access to intellisense that I was used to in 2012. 2 Examples i noticed right away were @Url.Content() and @Viewbag. The code still compiles and runs, just no intellisense. After messing with it a bit i figured i should check the upgrade log and sure enough i found ...

"Razor(CSHTML 和 VBHTML)文件的智能感知仅限于 HTML 标记.请参阅 http://go.microsoft.com/fwlink/?LinkID=317645 了解有关如何升级 MVC 3 项目的其他信息."

"Intellisense for Razor (CSHTML and VBHTML) files is limited to HTML markup. Please see http://go.microsoft.com/fwlink/?LinkID=317645 for additional information on how to upgrade an MVC 3 project."

提供的链接只是告诉您从 mvc3 升级到 mvc4.我的问题是:这是我唯一的选择吗?为了在旧的 mvc3 项目上使用 VS2013,我是否必须将它们全部升级,或者 vs2013 是否会支持 mvc razor 文件的完整智能感知?

The link provided just tells you to upgrade from mvc3 to mvc4. My question is: is that my only option ? In order to use VS2013 on older mvc3 projects am I going to have to upgrade them all or will vs2013 ever support full intellisense on mvc razor files?

推荐答案

在这里找到这个...

很快您将在 VS2013 中看到新版本的 MVC5.MVC5 将被纳入 VS2013.VS2013 将不支持MVC3. 我上次在channel9 确认过.所以那些只安装了 VS2013 或者没有旧版本的人会遇到仍然在 MVC3 中的项目的问题.发生此错误是因为 MVC4 和 5 安装不包含在 ASP.NET MVC 版本 3 中使用的 DLL.

Soon you will see a new version of MVC5 in VS2013. MVC5 will be incorporated in VS2013. MVC3 will not be supported in VS2013. I confirmed it on channel9 last time. So People who have installed only VS2013 or doesn’t have old version will be got trouble with the project that is still in MVC3. This error happen because MVC4 and 5 installation doesn’t contain the DLL that is used in Version 3 of ASP.NET MVC.

http://geekswithblogs.net/anirugu/archive/2013/10/16/how-to-migrate-asp.net-mvc-3--mvc4-project-to.aspx

最终将项目升级到 MVC 5 ... 创建了一个新项目并带来了我的模型、视图和控制器文件夹的所有内容.还必须更新 webconfig 以包含我在前一个项目中安装的一些包.

Ended up upgrading the project to MVC 5 ... Created a new project and brought over all the contents of my model, view and controller folders. Also had to update the webconfig to include some packages I had installed in the previous project.

这篇关于MVC3 项目中 VS2013 中的有限 Intelliesense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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