问题描述
我正在使用VS 2019和Web API(.NET Framework)创建应用程序.我需要创建一个空白网站,但只获取Web应用程序项目模板.我需要安装任何工具吗?请检查下图以了解我的需求.
I am creating an application using VS 2019 and Web API (.NET Framework). I need to create a blank website, but getting only web application project template. Is there any tools do i need to be installed? Please check the below image to understand my need.
VS 2017
VS 2019
推荐答案
要在Visual Studio 2019中创建"ASP.NET网站"项目,您需要将其他项目模板(以前的版本)" ASP.NET组件安装为如下所示.
To create "ASP.NET Web Site" projects in Visual Studio 2019 you need to install the "Additional project templates (previous versions)" ASP.NET Component as shown below.
我不得不承认我也错过了此选项,因为只有在单击ASP.NET工作负载时该选项才可见,并且未在单个组件"选项卡上列出!
I have to confess I'd missed this option too as it's only visible if you click on the ASP.NET workload and is not listed on the "Individual components" tab!
安装该组件后,现在可以使用这些模板:
After installing the component, the templates are now present:
这篇关于如何在Visual Studio 2019中创建ASP.NET网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!