Publishing a project with files with very long names

I am trying to publish a project in Visual Studio 2013 that has files with very long names, including the location of the path. I moved the project to a place closer to my root C: \ drive, which allows you to compile it, but when publishing it tries to copy files to the% appdata% folder, as a result of which the name will exceed the limit.

Here is the error I get:

Error 10 Copying file node_modules\grunt-bower\node_modules\bower\node_modules\bower-registry-client\node_modules\bower-config\node_modules\optimist\node_modules\minimist\.travis.yml to C:\Users\jake\AppData\Local\Temp\WebSitePublish\WebProject--1320288221\obj\Debug\Package\PackageTmp\node_modules\grunt-bower\node_modules\bower\node_modules\bower-registry-client\node_modules\bower-config\node_modules\optimist\node_modules\minimist\.travis.yml failed. 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. 0 0 WebProject 

Is there a way to change this project name or where is it temporarily copied so that I can publish from Visual Studio?

+5
source share
1 answer

Quoting @Britton from A Too Long Way to Publish a Website Project :

Add this to your publication profile to change the temporary directory for the package / publication:

 <AspnetCompileMergeIntermediateOutputPath>c:\shortPath\</AspnetCompileMergeIntermediateOutputPath> 

Or according to the publication of the website due to the file path being too long (quoting @Jason Beck and @VeeKayBee ):

Add the following default line to the PropertyGroup of the web project file:

 <IntermediateOutputPath>..\Temp</IntermediateOutputPath> 
+4
source

All Articles