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
 

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

Tina Dony said...

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

garry dam 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.

Post a Comment