Deployment Center failed error: unable to create file filename too long error

Amardeep Singh 20 Reputation points
2025-07-02T18:52:38.78+00:00

Normally when i push new changes to github, its automatically build without issues but today i have to disconnect github and connect it again but now its keep failing . How can i fix this ASAP?

Source: GitHub

Build provider: App Service Build Service

Runtime stack :.NET

Version :v4.0

error: unable to create file src/packages/EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0/DesignTime/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.dll: Filename too long\nerror: unable to create file src/packages/EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0/DesignTime/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.xml: Filename too long\nerror: unable to create file src/packages/EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0/lib/NET4/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.dll: Filename too long\nerror: unable to create file src/packages/EnterpriseLibrary.WindowsAzure.TransientFaultHandling.5.1.1212.0/lib/NET4/Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.xml: Filename too long\nAlready on 'master'\n\r\nC:\Program Files\Git\cmd\git.exe checkout master --force
Azure DevOps
{count} votes

Accepted answer
  1. Durga Reshma Malthi 5,650 Reputation points Microsoft External Staff Moderator
    2025-07-03T09:12:40.57+00:00

    Hi Amardeep Singh

    If you're using Git version 2.13 or later, you can enable long path support by running the following command in your Git Bash or command prompt:

    git config --global core.longpaths true
    

    If possible, consider restructuring your project to shorten the paths. This could involve moving the project to a directory with a shorter path or renaming folders to have shorter names.

    Review your project for any unnecessary files or packages that can be removed or excluded from the build process. This can help reduce the overall path length. If you have a lot of packages or dependencies, consider cleaning up your repository by removing unused packages or using a .gitignore file to exclude certain files from being tracked.

    If the above doesn’t work, open the.git/config file in your repo and add:

    [core]
        longpaths = true
    

    Then restart your build or re-clone the repo.

    Hope this helps!

    Please Let me know if you have any queries.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.