Azure Web App deploy: Web Deploy cannot modify the file on the destination because it is locked by an external process

前端 未结 11 812
甜味超标
甜味超标 2020-12-14 07:24

I am using the \"Azure Web App Deployment\" build step in VSTS to publish an ASP.NET Core API to an Azure Web App:

Occasionally, this step breaks with the f

11条回答
  •  心在旅途
    2020-12-14 08:01

    I was getting the same error while I was trying to publish my Azure Function App. I followed this Microsoft document and did the following steps.

    1. Right click on your Project and select Edit ....csproj
    2. Add true in PropertyGroup tag

      
        netcoreapp2.1
        v2
        true
      
      
    3. Save and Rebuild your solution

    4. Now publish again

    If that didn't work for you, you can always add MSDEPLOY_RENAME_LOCKED_FILES=1 as Mr. Ben mentioned in his answer, to your Application settings. You can do that from Visual Studio itself.

    Hope it helps

提交回复
热议问题