Forum Discussion
Unable to deploy to Azure Web App because path, file name, or both are too long
Hi,
I have recently encountered the following error when I tried to deploy my web app to Azure using Visual Studio Code.
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
I have tried to use Azure CLI to deploy the web app, by following the steps outlined in https://docs.microsoft.com/en-us/azure/app-service/deploy-zip?tabs=cli. However, I am getting the same error.
My colleague who is using a Macbook, is able to deploy to the web app to Azure without any issues. I am using Windows 10 Enterprise.
Can anyone advise?
Thank You
1 Reply
Seems it was because Windows enforces a maximum path length of 260 characters, unlike macOS. To resolve it, you need to enable long path support in Windows and adjust your deployment configuration.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry