3

I am unable to publish a project to Azure from Visual Studio. I am running into an issue because I am getting the following error:

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 already tried many common solutions. The problem arises in the temporary directory location, but I have shortened this. The directory that is too long is b:\test\WebSitePublish\WebProject-1309592107\obj\Debug\Package\PackageTmp\node_modules\grunt-bower\node_modules\bower\node_modules\request\node_modules\form-data\node_modules\combined-stream\node_modules\delayed-stream\test\integration\test-delayed-http-upload.js, starting with a short directroy name.

I have also tried installing npm install -g flatten-packages but get the same error.

How can I make this project push?

Carrie Kendall
  • 11,124
  • 5
  • 61
  • 81
Jake
  • 3,411
  • 4
  • 21
  • 37
  • Can you [robocopy](http://en.wikipedia.org/wiki/Robocopy) the project to a root directory then publish? robocopy /e /r:1 /w:0 b:\test\WebSitePublish\WebProject-1309592107 b:\pub\WP-1309592107 – lloyd May 18 '15 at 15:30
  • I'm already operating very close to the drive root (at b:\test), I don't think getting rid of four more characters will solve it, unless I misunderstand. – Jake May 18 '15 at 15:31
  • regarding your edit, b:\test is what comes up when I already try to deploy. It contains the temporary files. I'm not sure how to grab and copy at the intermediate level like that. I am pressing publish, and then these files are being copied to b:\test and giving an error in `__VSDeploymentFailure__.txt.` – Jake May 18 '15 at 15:35
  • 24 characters , WebSitePublish\WebProject - excluding WP. what is the root directory for the project? – lloyd May 18 '15 at 15:35
  • root directroy is b:\dw . How do I copy the temporary files generated from when I select publish? – Jake May 18 '15 at 15:37
  • so you're publishing your project with a related test project that has some lengthy file names? – lloyd May 18 '15 at 15:39
  • Ugh, isn't this just the most frustrating thing? :( I've run into this so much while developing with node on windows. `` However, if you're trying to publish, you shouldn't actually need node's build tools, just the output. I am unfamiliar with azure so I don't know if it is trying to be too smart about things, but is there any way you can build the files pre-publish? – Carrie Kendall May 18 '15 at 15:41
  • Also, check this solution out: http://stackoverflow.com/a/18472948/998328 – Carrie Kendall May 18 '15 at 15:45
  • @lloydm the test name is probably not the best. I have set the temporary output directory for the project to be in b:\test instead of %appdata%\whatever. – Jake May 18 '15 at 15:47
  • @CarrieKendall yes, incredibly frustrating. Azure is just what I am publishing to, and publishing from VS seems to be the easiest way to do this. The problem is that I'm also getting long file names in the intermedium. I'll try the solution you linked to though, thanks! – Jake May 18 '15 at 15:50

0 Answers0