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.