简体   繁体   中英

How to create an ASP Core web app deployment in Visual Studio 2022?

I'm attempting to create an Azure Pipeline that deploys an ASP Core web app to an Azure App Service.

I've created the Azure pipeline to build the web app.

The pipeline deployment expects to find a.zip deployment package in the build, so I'm expecting to configure a Publish step to create this.

In VS2022 the only publish option that creates a web deployment is the Web Server (IIS) option which requires the details of an IIS server.

So how in VS2022 do I configure a simple web deployment publish step? I don't expect to have to set up IIS to do this.

You should use do.net publish command to do this. For local development use do.net publish CLI, for Azure Pipeline you should use DotNetCoreCLI task with 'publish' command option. Example here: https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/webapp?view=azure-devops

So if I am not mistaken you question is specific to how in VS2022 you publish. As long as you have the Azure SDK installed this option should come up when you try to publish a ASP core web app.

You can choose Azure and point it to your app service or if you want VS to publish the artifacts you can choose the 'folder' option and publish to your local file system and if you zip up that folder where it was published you have your.zip deployment package.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM