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
1 Answer
Reset to default 0To 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 whenUseWebDeploy == 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: