22 October 2012

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

When you try to compile a project in visual studio and get this message

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



All you need is to correct an error that VS created (and I do not know how)
He has written a number of times in the "Deployment Path"

"$ SharePoint.Project.FileNameWithoutExtension $ _ $ SharePoint.Feature.FileNameWithoutExtension $"



Instead of one in "Deployment Path"
It should be like this

"YourValue_ $ SharePoint.Feature.FileNameWithoutExtension $"

Yours,
Roi
 

9 comments:

Alex said...

Hi Roi,
It's a good solution, but the problem is that
packages installed earlier on another environment, will cause an error since the path of the new package is changed.

Best,
Alex.

Roi kolbinger said...

Alex Hey,

Not exactly understand what the problem is? You can write any name of the property under 260 characters.

For example, if you write the name of your feature too big, you will get the same message. Should ensure that all property be less than 260 characters.

Roi

Roi kolbinger said...

I checked this issue - SharePoint.Project.FileNameWithoutExtension
This is not Project Name is the name of the folder. The name is misleading.
All you need to worry about the name of the project at first (that is the name of the folder) must be short.

Unknown said...

With path too long error I use an alternative tool "Long Path Tool" a guaranteed fast and easy fix .

Unknown said...

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.

Roi kolbinger said...
This comment has been removed by the author.
joshua42 said...

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

Liam Flint said...

I just download and use "Long Path Tool" to fix your error fast and easy.

John Stephen said...

I suggest you try Long path tool is the very good program for easily delete, copy & rename long path files, error, unlock solution.
Try it and solve your problem.

Post a Comment