简体   繁体   中英

Visual Studio 2015 Update - MVC not available in IDE

I have a project which uses MVC and Bootstrap (C#). It was working 100% in VS2013. Yesterday, I moved to 2015, but now, all my MVC objects are not recognized by the IDE anymore.

I am getting the design time error:

HtmlHelper does not contain a definition for 'BeginForm'

and all other functions of HtmlHelper.

Is there a step when moving from 2013 to 2015 that is required to allow for MVC functionality to be available in the ide? Note, the solution compiles and runs perfectly. I just don't have code hints and the cshtml files all show errors when editing.

We believe these are occurring because you are currently using MVC 4, and MVC 4 tooling is not included with Visual Studio 2015. Only MVC 5 and MVC 6 tooling is included. If you are in fact using MVC 5 and seeing these issues, please do let us know. You can confirm you are using MVC 4 by opening packages.config and scrolling to the entry for Microsoft.AspNet.Mvc. If the version listed starts with "4", this means you are using MVC 4.

Having said that, we appreciate your feedback and the investment you have made in MVC 4. Based on yours and other customers' feedback, we are looking into the possibility of making MVC 4 tooling available for Visual Studio 2015. In the meantime, your project will compile and run in Visual Studio 2015 despite the tooling issues. Alternatively, you can keep both Visual Studio 2013 and 2015 installed on your machine side-by-side. That way, you can use Visual Studio 2013 for MVC 4 projects and Visual Studio 2015 for MVC 5 and above projects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM