Sunday, September 25, 2011

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters.

If you receive the following error in Visual Studio while packaging WSP:

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

then simply move all your projects from

C:\Users\YOUR_USERNAME\Documents\Visual Studio 2010\Projects\

to root drive


Visual studio does not allow absolute path that exceeds 260 characters. so use short filenames when you create any WSP package and create your project on root directory to avoid long absolute paths.


  1. Long Path Tool helped me to solve that problem

  2. Hello. i was also having the same issue but Long Path Tool helped me in this situation. You can see here It might help you.
    Thanks and Regards,

  3. This is a Windows* OS/file system issue.The cause is directory paths on the drive is longer than 255 characters (including spaces).There's a lot of additional softwares which can fix this problem like Long Path Tool.
    Long Path Tool can simplify and probably end your problems in unlocking, managing and renaming files that appear to have a long filename. Since in some instances, you may have experienced problems accessing, managing and even renaming files that have more than 255 characters, this utility has been made to answer this particular scenario. If you have also encountered problems like error messages that tell you that the path too long, too long path, destination path too long or cannot delete file then this program is definitely for you. This will totally take place of Windows Explorer, Far Manager or other file managing utilities since this is maybe used in any type of Operating System even the earliest Windows 95 version.

  4. Dont waste time renamine files, i had a lot to rename but downloading software like long path tool would help a lot. no hassle on your side.

  5. Long path tool is the best solution for your problem. try it and solve your problem.

  6. I agree to the past comments. Try and download " Long Path Tool " is also useful in situations where you see these error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

  7. I would recommend in this case to try program Long Path Tool