asp.net-mvc Visual Studio 2015 是否支持旧版本的 MVC?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30123609/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does Visual Studio 2015 support older versions of MVC?
提问by user3610920
Does Visual Studio 2015 support the older versions of MVC:
Visual Studio 2015 是否支持旧版本的 MVC:
- MVC3
- MVC4
- MVC5
- MVC3
- MVC4
- MVC5
Not all hosting environments support the newer versions of MVC, so to support needs of older infrastructure this is required.
并非所有托管环境都支持较新版本的 MVC,因此为了支持旧基础架构的需求,这是必需的。
If it is supported how do you create new solutions using the older MVC versions in Visual Studio 2015? By default new MVC projects are created as version 5.2.
如果支持,您如何使用 Visual Studio 2015 中的旧 MVC 版本创建新解决方案?默认情况下,新的 MVC 项目创建为 5.2 版。
回答by Amirhossein Mehrvarzi
Does Visual Studio 2015 support the older versions of MVC?
Visual Studio 2015 是否支持旧版本的 MVC?
Yes, It support them just after a migration (for adding/supporting new features in IDE like Intellisenseand etc).
是的,它在迁移后支持它们(用于在 IDE 中添加/支持新功能,如Intellisense等)。
how do you create new solutions using the older MVC versions in Visual Studio 2015?
您如何使用 Visual Studio 2015 中的旧 MVC 版本创建新解决方案?
This is not an intellectual action since the newer platforms have a lot of fixes and advantages rather than prior ones. Unless, you may be forced to use an older one due to lack of hosting support, In this case you can't Create an older version of MVC project by the IDE (VS 2015) itself, unless by adding older assembly references and some handy works in configuration based on your complete awareness of older required files and architecture, since the newer IDE usually don't have the previews references.
这不是智力行动,因为较新的平台有很多修复和优势,而不是以前的。除非,由于缺乏托管支持,您可能被迫使用旧版本,在这种情况下,您无法通过 IDE (VS 2015) 本身创建旧版本的 MVC 项目,除非添加旧的程序集引用和一些方便的基于您对旧所需文件和体系结构的完全了解,在配置中工作,因为较新的 IDE 通常没有预览参考。
Note: The VS 2015 is just an IDE (Integrated Development Environment). You can run any MVC version on it (with above considerations), But the IDE's new features will be limited likely. For example, the result of MVC 4 migration in VS 2015 will be:
注意:VS 2015 只是一个 IDE(集成开发环境)。您可以在其上运行任何 MVC 版本(考虑到上述因素),但 IDE 的新功能可能会受到限制。例如,VS 2015 中 MVC 4 迁移的结果将是:
ASP.NET MVC 4 projects have limited functionality in Visual Studio Next. Commands such as Add Controller, Add View, Add Area, and Go to View/Controller are not available. Intellisense for Razor (CSHTML and VBHTML) files is limited to HTML markup. Please see http://go.microsoft.com/fwlink/?LinkID=320968for additional information on how to upgrade an MVC 4 project.
ASP.NET MVC 4 项目在 Visual Studio Next 中的功能有限。添加控制器、添加视图、添加区域和转到视图/控制器等命令不可用。适用于 Razor(CSHTML 和 VBHTML)文件的 Intellisense 仅限于 HTML 标记。有关如何升级 MVC 4 项目的其他信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=320968。
Which suffers from the lack of Intellisense and etc. But you can still run/develop the project with it or another IDE like Visual Studio Codeand debugging the projects will make sense here.
它受到缺乏智能感知等的影响。但是您仍然可以使用它或其他 IDE(如Visual Studio Code)运行/开发项目,并且在这里调试项目是有意义的。
回答by Van Kichline
Visual Studio 2015 RTM supports MVC 5 and MVC 6 only; tooling and Razor support are missing for MVC4 and earlier versions. Note that MVC4 projects will be migrated automatically and should compile and run on VS 2015 RTM, but the editing experience in Razor views will be poor.
There has been significant negative feedback concerning this change since release, and the team is planning to ship MVC4 support for 2015 RTM. Watch the WebDev Blogfor an official announcement soon.
The Send-a-Smile feature in Visual Studio 2015 is responsible for the rapid acquisition of this feedback and the decision to respond quickly. Consider using Send-a-Smile if feature changes impact you negatively.
Visual Studio 2015 RTM 仅支持 MVC 5 和 MVC 6;MVC4 和更早版本缺少工具和 Razor 支持。请注意,MVC4 项目会自动迁移,应该在 VS 2015 RTM 上编译和运行,但 Razor 视图中的编辑体验会很差。
自发布以来,有关此更改的大量负面反馈一直存在,并且该团队计划为 2015 RTM 提供 MVC4 支持。观看WebDev 博客,了解即将发布的官方公告。
Visual Studio 2015 中的发送微笑功能负责快速获取此反馈并做出快速响应的决定。如果功能更改对您产生负面影响,请考虑使用 Send-a-Smile。
回答by Eivind Eriksen
The Visual Studio 2015 Update 1 RC should support MVC 4 projects. See https://msdn.microsoft.com/en-us/library/mt591926.aspx
Visual Studio 2015 Update 1 RC 应该支持 MVC 4 项目。请参阅https://msdn.microsoft.com/en-us/library/mt591926.aspx

![asp.net-mvc ASP.net MVC [HandleError] 没有捕获异常](/res/img/loading.gif)