最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

skip Web.config file in an Azure Release Pipeline for Azure Web App task - Stack Overflow

programmeradmin1浏览0评论

I am trying to skip a file named Web.config for one of my dotnet core projects. My goal is to ensure that the file doesn't get overwritten when deploying it using Azure Web App task in the release pipeline.

I do not want to modify the repo code in any way. Can someone please help me with this?

I am trying to skip a file named Web.config for one of my dotnet core projects. My goal is to ensure that the file doesn't get overwritten when deploying it using Azure Web App task in the release pipeline.

I do not want to modify the repo code in any way. Can someone please help me with this?

Share Improve this question asked Mar 28 at 11:21 blnkdatablnkdata 11 bronze badge 1
  • Did you get a chance to refer this SOThread – Harshitha Commented Mar 28 at 11:31
Add a comment  | 

1 Answer 1

Reset to default 0

To skip Web.config file when deploying your web app, you can use argument -skip:objectName=filePath,absolutePath='web\.config' See the details about skip rules from this blog.

However, Azure Web App task doesn't support additional argument. To handle more custom scenarios, you can use Azure App Service deploy task.

AdditionalArguments - Additional arguments
string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Default value: -retryAttempts:6 -retryInterval:10000.

Check Select deployment method option -> Select Web Deploy from Deployment method drop-down list -> Add -skip:objectName=filePath,absolutePath='web\.config' to Additional arguments.

Checking the log, you will be able to see what is shown in the screenshot:

发布评论

评论列表(0)

  1. 暂无评论