I am developing an Azure Functions Project and when I publish first time, OK. Then I publish again, this Error appears:
Web Deploy cannot modify the file
My Azure Function is in V2, and got locked down with FILE_IN_USE.
There is an open issue on this: https://github.com/Azure/azure-functions-host/issues/569
According to Paul Batum's comment from 6 Sep:
"In Functions V2 there is no shadowcopy behavior (because it does not exist in .NET core) and so running into locking issues is more likely. However we have implemented support for the "take app offline" feature that is provided through msdeploy. "
So I checked take app offline and tried, and the file is not locked when I redleploy.