10

I updated my Asp.net core Blazor WebAssembly app to .net 6. Everything is fine, but the deploy from github actions doesn't work and throws this error:

...
Copying file: 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.dll'
Copying file: 'Microsoft.AspNetCore.Authentication.JwtBearer.dll'
Omitting next output lines...
Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
An error has occurred during web site deployment.
Kudu Sync failed
\n/opt/Kudu/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"
Error: Failed to deploy web package to App Service.
Error: Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details.

What could be a problem here?

  • app works on local
  • I updated the azure app to .net6 in configuration
  • I tried to restart the app
  • the app is in Central US region

EDIT/SOLUTION:

Previously the path to licence file was: /home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE/LICENSE new file was without the LICENSE dir. So when the new version of app arrived it tried to update the LICENSE file, which was actually a directory. Removing LICENSE/LICENSE helped.

Alamakanambra
  • 5,845
  • 3
  • 36
  • 43

2 Answers2

7

I ended up deleting the contents of /home/site/wwwroot/ to resolve this as well. I also needed to update the configuration to .NET 6 in the site's configuration and redeploy before my site started working.

Trevor Davis
  • 101
  • 2
  • Removing the LICENSE directory and file would also seem to be enough to get around this issue too. It's a very annoying issue, and there seems to be no documentation from MS about it and i guess lots of people will be doing this update for .net6 from now on. – Morph Oct 27 '22 at 12:57
  • Worked for me when switched from .NET6 to .NET6 Isolated with Azure functions – Titouan56 Jan 09 '23 at 14:11
  • "Update the configuration" .. I think it would help if you mentioned what you updated – Tim Davis Aug 18 '23 at 22:53
  • In Azure portal, select the web app. Under the Settings header, choose Configuration. Under the General Settings heading, and under Stack settings, ensure the Stack is set to .NET, and Major version is .NET 6 and Minor version is .NET 6 (LTS). Save the configuration which will restart the web app. – Trevor Davis Aug 22 '23 at 13:22
0

For me it was some rogue Thumbs.db file (nasty little files that are hidden). I had to log in to FTP /home/site/wwwroot/, delete everything in this folder. Then some folders wouldn't delete. So I had to turn on "Server -> Force Show Hidden Files" in filezilla. Then I could see thumbs.db and delete it.. I also had to remove all Thumbs.db from my project, and repo, then redeploy.

Tim Davis
  • 524
  • 6
  • 17