简体   繁体   English

Visual Studio 2019 中的 .NET 框架 4 缺少 MVC 模板

[英]MVC template missing for .NET framework 4 in Visual Studio 2019

Noob here, I'm trying to create a Web Application using .NET 4 framework with MVC template in Visual Studio PRO 2019. as our server still uses .NET 4.菜鸟在这里,我正在尝试使用 .NET 4 框架和 Visual Studio PRO 2019 中的 MVC 模板创建一个 Web 应用程序。因为我们的服务器仍然使用 .NET 4。

Steps I used to create project: Step 1 --> Step 2 --> Step 3我用来创建项目的步骤: Step 1 --> Step 2 --> Step 3

The MVC templates are not populated and the Text boxes are disabled for .NET 4 (See Step 3), but MVC template appears for .NET Framework 4.5 and above though, check Image 1 , Image 2 MVC 模板未填充,并且 .NET 4 的文本框被禁用(请参见步骤 3),但 MVC 模板出现在 .NET Framework 4.5 及更高版本中,请查看图 1图 2

That's when I came across the Comment in the post Missing MVC template in Visual Studio 2015 , My question is, Is it possible to even create MVC template using .NET framework 4 in Visual studio 2019?那是当我在 Visual Studio 2015 中缺少 MVC 模板的帖子中遇到评论时,我的问题是,是否可以在 Visual Studio 2019 中使用 .NET 框架 4 创建 MVC 模板?

I'd appreciate any leads here.我会很感激这里的任何线索。 Thanks in advance提前致谢

Based on my search, you can see the following link about the similar question Asp.Net Mvc Template missing in the Developer Community.根据我的搜索,您可以看到以下链接关于开发人员社区中缺少的类似问题Asp.Net Mvc Template

The last reply by Phil Henning [MSFT] says that it will occur the problem when you select .NET Framework 4 or earlier. Phil Henning [MSFT] 的最后回复说,当您使用 select .NET Framework 4 或更早版本时会出现问题。

If you still want to solve the problem, you can report a problem in Developer Community .如果您仍然想解决问题,可以在开发者社区报告问题。

Only ASP.NET MVC 5.x is supported in VS2017 and above, VS2017及以上版本仅支持ASP.NET MVC 5.x,

https://developercommunity.visualstudio.com/t/using-aspnet-mvc4-in-vs2017/284556 https://developercommunity.visualstudio.com/t/using-aspnet-mvc4-in-vs2017/284556

So you won't be able to target .NET Framework 4.0, but 4.5 and above, as that's the dependency of ASP.NET MVC 5.因此,您将无法针对 .NET Framework 4.0,而是 4.5 及更高版本,因为这是 ASP.NET MVC 5 的依赖项。

Check.Net 4.x framework is installed in VisualStudio Installer. Check.Net 4.x 框架安装在 VisualStudio 安装程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 (asp.net)Visual Studio 2017中缺少MVC模板 - (asp.net) MVC Template is missing in Visual Studio 2017 Visual Studio 2019 应用程序需要 .NET 框架 - Visual Studio 2019 The application requires .NET framework Visual Studio 2019 未显示 .NET 5 框架 - Visual Studio 2019 Not Showing .NET 5 Framework Visual Studio 2019 中的单元测试项目模板仅适用于 .NET Framework 是否重要? - Does it matter that Unit Test project template in Visual Studio 2019 is for .NET Framework only? 无法在 Visual Studio 2019 中的 ASP.NET MVC 和实体框架上自动创建类 - Cannot automatically create classes on ASP.NET MVC & Entity Framework in Visual Studio 2019 是否有用于Visual Studio(MVC 5框架)的模板引擎? - Is there a template engine for Visual studio (MVC 5 framework)? Visual Studio 2019 中缺少 ASP.NET 核心 Web 应用程序模板和所有 ASP.Net 核心模板 - Missing ASP.NET Core Web Application Template and all ASP.Net Core Templates in Visual Studio 2019 如何将 Visual Studio 2019 中的 .NET 版本更改为 .NET Framework 4.7.2? - How to change .NET version in Visual Studio 2019 to .NET Framework 4.7.2? Visual Studio 2019,安装 SDK 后缺少 .NET 5 - Visual Studio 2019, .NET 5 missing after installing SDK Class 库(.NET 标准)模板在 Visual Studio 2019 中不起作用 - Class Library (.NET Standard) Template Not working in Visual Studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM