Search code examples
azureazure-web-app-service.net-6.0kudu

Cannot deploy Azure app service via GitHub Actions after upgrading from .NET Core 5 to 6


I updated my ASP.NET Core web application from .NET Core 5 to .NET Core 6. This seems to work fine locally.

I then checked my changes into GitHub, whereupon a GitHub action builds and deploy this to my App Service on Azure. This did not work the first time, because my YAML file still referenced .NET 5. I changed that and tried again. However, I then got a different error:

Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'

I found a post describing this very error and attempted to follow the instructions suggested by Trevor Davis (https://stackoverflow.com/a/70136206/98422), which was to delete the contents of the /home/site/wwwroot/ folder in my deployed App Service and re-deploy.

However, having done so, I now get a different error when trying to deploy the website:

Error: ENOENT: no such file or directory, open '/home/site/wwwroot/Azure.Storage.Blobs.dll'

An error has occurred during web site deployment.

Kudu Sync failed

...and now I've no idea how to fix it. And my website is down :-(

Can anyone please advise?


Solution

  • Well, I hope this helps someone else. I discovered that simply stopping the website while the deploy was in progress was enough to make it work again.

    Two days needless downtime... :-(