SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Customer made a branch code. I have downloaded new branch and trying to make package. VS returned an error - 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. New branch have really long definition, but it in TFS. How to resolve problem? Thanks!

share|improve this question
up vote 2 down vote accepted

The best bet for me was to move the base folder for the repository to sit directly under the "C:\" drive. Otherwise you will have to change the names of some folders that are in the path to your solution in order to shorten the length of the path.

Also, take a look at this similar question.

share|improve this answer
Thanks guys, but i see that customer made this long branch definition in TFS and code mapped for me with that long subfolders that are in the source control... – Serhio G. Lazin Apr 27 '12 at 14:36
Thanks very much! I just simply re-map the branch to a different local folder on my workspace – Serhio G. Lazin Apr 30 '12 at 13:25
Happy to help, and welcome to SharePoint StackExchange. If this answer or any other one solved your issue, please mark it as accepted. – skeletank Apr 30 '12 at 14:02

If the error is during packaging it could be because the name of your Feature folder (combined with the SharePoint system folder path) is too long. By default, Features are named [project name]_[feature name]. If you properly name your Features you don't need the project name prepended. You can change the Feature folder name by setting the Deployment Path property of the Feature.

share|improve this answer
I have used Windows Server 2008 and trying to make HardLink using mklink utill. It maked folder with my source code, but VS returns the same error – Serhio G. Lazin Apr 27 '12 at 17:48
If it's the error I think it is, it has nothing to do with where your source code resides. It's where the Feature folders reside when your package gets deployed. – Rob Windsor Apr 27 '12 at 17:56
simply re-map the branch to a different local folder on my workspace – Serhio G. Lazin Apr 30 '12 at 13:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.