[英]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.