0

When I try to publish my ASP.NET app to Azure, I get the

"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."

error. I see quite a few questions about this and most people are suggesting that we edit the publish profile XML file. I followed some of the suggestions here: Website publish failing due to file path being too long

The problem is that whatever I enter, VS 2015 seems to be using another temp folder path.

Is there some global file I need to edit as changing the publish profile for my app doesn't seem to change/override a global setting.

Community
  • 1
  • 1
Sam
  • 26,817
  • 58
  • 206
  • 383

2 Answers2

3

Finally, I was able to get it going by adding the following in the publish profile file - the idea is to use a really short folder name:

<PublishTempFolderName>i2</PublishTempFolderName>

And there are some global settings. This post provides more information about where to find those global settings:

The fully qualified file name must be less than 260 characters, and the directory name must be less than 248

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Sam
  • 26,817
  • 58
  • 206
  • 383
-1

Sometimes to restart visual studio may work.

ddagsan
  • 1,786
  • 18
  • 21