Deploying to Azure – The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.

This week I was writing some Powershell scripts to deploy our application to Azure (blog post to follow to save others the trouble of finding out how to do this).

When I deployed this week after the team had been doing some refactoring I got the error:
The path is too long after being fully qualified.  Make sure the full path is less than 260 characters and the directory name is less than 248 characters.

Agrahhh! Ok I’ll admit I am not a big fan of our very long naming convention but even with this none of the paths actually exceed this length. The problem is due to Development Fabric using a temp directory behind the scenes. For a full explanation please see: http://blogs.msdn.com/b/jnak/archive/2010/01/14/windows-azure-path-too-long.aspx

This can be resolved (unless you have really long paths!) by creating an environmental variable called _CSRUN_STATE_DIRECTORY and setting it to a directory such as c:\a\. Azure will then use this temp directory instead that will hopefully get around this issue.

Advertisements

3 thoughts on “Deploying to Azure – The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.

  1. I had the similar problem and faced it a lot of times. I often solve this type of problems using “Long Path Tool”. It helped me in solving this error and all related errors.

  2. thanks for sharing EthanGreg! I have used Long Path Tool and it really helped me. Thanks again for sharing and I hope, you will post more useful tools for us.

  3. This is a Windows* OS/file system issue.The cause is the directory paths in the system is longer than 255 characters (including spaces).There’s a lot of additional softwares which can fix this problem like Long Path Tool.
    http://PathTooDeep.com

Comments are closed.