Visual Studio fails to deploy Azure Function App on production slot
Hello,
I created a function App on Azure (Linux, Consumption plan) automatically created through Visual Studio tools (latest versions, VS2022 Community). Deployments were going fine at first, then I had to add
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
to my project because I needed the package Microsoft.IdentityModel.Protocols.OpenIdConnect version 7.0.0 and the function app was not working without it (the package was not found, at least when running the function locally).
When everything worked locally, I tried to deploy and got an error with a log file containing no explanation at all of what went wrong and where. I don't know if the zip upload failed or got through, or if the function was able to restart or anything else. I only saw that it didn't update the hosted functions code like it should have. But no logs whatsoever.
Then I tried lots of things with Azure Storage, removing locks, uploading my own zip, etc. everything failed.
Then I tried to create one deployment slot and Visual Studio uploaded to it without any problems. Then I swapped so that it would go to production, again no problems. But still Visual Studio won't deploy my zip package on the production deployment slot, and it deploys always without problems on the "test" slot.
So now every time I have to deploy it on the test slot and then swap it with the production slot. I don't want to recreate a new function app as I added some parameters and a list of IPs to allow public access, I'd like to be able to 'reset everything' so that both deployment slots can be deployed to with Visual Studio.
Does anyone have a solution for this?
Thanks,
Mathieu