Folkie wrote:Only just spotted this (almost two years down the line), but I've previously solved this error by shortening some very long image filenames in my project. If just one filename is too long (when you take the complete path of the file structure into account) the build can fail, so it's good practice to keep filenames short if possible to try to avoid this.
Exactly. Including image file names and folder names. They all count towards the limit. I don't know what the limit is, but on my machine, the build is done here:
c:\bitbucket\zzzdocs\Output\Paul.Pehrson\Temp\TargetName\ and then the file names in their respective folders. Here is one with an actual URL from my project:
c:\bitbucket\zzzdocs\Output\Paul.Pehrson\Temp\TopNav2022\Content\Resources\Images\UX-widgets-and-menu-bars\UI-Menu-Bar-17-2.png
That's almost 130 characters. If you have a deep folder structure in your /Content/ folder, or if your project is deep on your drive, it gets worse. Imagine:
c:\Users\Paul-Pehrson\Documents\My_Projects\zzdocs\Output\Paul.Pehrson\Temp\TopNav2022\Content\Resources\Images\UX-widgets-and-menu-bars\UI-Menu-Bar-17-2.png
That's over 150-ish characters.
The content isn't copied to the output folder specified in the target settings until after it finishes the build in the /temp/ folder listed above. So that is where the file name counts make the difference between a working and a failed build. I would guess that the character limit is somewhere in the 250 range, so you do have quite a bit of room.
If you are looking for your longest file names, go into the Content Explorer and use the expand all button (plus icon in the menu). Then scroll through all your content to see where you have deep folder paths, long file name, and long folder names. They all count towards the limit.