简体   繁体   English

VS 2017 ASP.Net Core Web应用程序无法定位.Net Framework

[英]VS 2017 ASP.Net Core Web Application cannot target .Net Framework

I seem to have lost the ability to create an ASP.Net Core Web Application that targets the .Net Framework. 我似乎已经失去了创建针对.Net Framework的ASP.Net Core Web应用程序的能力。 The dropdown is disabled where it used to be enabled. 下拉菜单在以前启用的地方被禁用。

在此处输入图片说明

I have .Net 471, 472 SDKs and targeting packs installed and my VS2017 is updated to 15.7.6. 我已经安装了.Net 471、472 SDK和目标包,我的VS2017已更新为15.7.6。

I've tried uninstalling/reinstalling the .Net 4.7x SDKs and targeting packs but that didn't help. 我尝试卸载/重新安装.Net 4.7x SDK和目标包,但这没有帮助。

Is there something short of reinstalling Visual Studio from scratch that I can do? 我可以做些什么从头开始重新安装Visual Studio吗?

The project template only supports .NET Core. 项目模板仅支持.NET Core。 However, once you create the project, you can edit your .csproj and change: 但是,一旦创建了项目,就可以编辑.csproj并更改:

<TargetFramework>netcoreapp2.1</TargetFramework>

To: 至:

<TargetFramework>net472</TargetFramework>

Save, and you're good to go. 保存,您一切顺利。

It would appear that there are two templates now that can create an ASP.Net Core Web Application. 看来现在有两个模板可以创建ASP.Net Core Web应用程序。

Under .Net Core 在.Net Core下

在此处输入图片说明

And under Web 和在网络下

在此处输入图片说明

To get the option of selecting to target .Net Core or .Net Framework, you must use the template under Web. 要获得选择以.Net Core或.Net Framework为目标的选项,必须使用Web下的模板。

在此处输入图片说明

暂无
暂无

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

相关问题 VS 2017 .NET 4.6.2新的ASP.NET核心Web应用程序(.NET Framework)默认为x86平台 - VS 2017 .NET 4.6.2 new ASP.NET Core Web Application (.NET Framework) defaults to x86 platform Visual Studio 2022 - asp.net web 应用程序 - 缺少目标框架 .NET 核心 - Visual Studio 2022 - asp.net web application - Target Framework missing .NET Core VS2017 MSBuildWorkspace无法使用转换后的ASP.Net Core Web应用程序打开解决方案 - VS2017 MSBuildWorkspace fails opening solution with converted ASP.Net Core Web application ASP.NET核心Web应用程序(.NET Framework)TagHelper Intellisense - ASP.NET Core Web Application (.NET Framework) TagHelper Intellisense ASP.NET Web 应用程序(.NET 框架)中的 asp.net 核心 SignalR 配置 - asp.net core SignalR configuration in ASP.NET Web Application (.NET framework) VS2017 - 缺少 .net core &gt; 2.1 作为目标框架 - VS2017 - Missing .net core > 2.1 as target framework Visual Studio社区2017-ASP.Net Web应用程序(.NET Framework)模板已损坏? - Visual Studio Community 2017 - ASP.Net Web Application (.NET Framework) Template broken? ServiceStack 和 AWS:创建了一个 ASP.NET 空项目,但无法在目标框架中选择 .NET Core - ServiceStack and AWS: Created a ASP.NET Empty project, but cannot select .NET Core in target framework ASP.NET Core脚手架错误VS 2017 - ASP.NET Core Scaffolding Error VS 2017 ASP.NET Core Web Application(.NET Framework)项目模板缺少System.Web.MVC dll - ASP.NET Core Web Application (.NET Framework) project template is missing System.Web.MVC dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM