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
 

Comments

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

    ReplyDelete
  2. 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

    ReplyDelete
  3. 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.

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

    ReplyDelete
  5. 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.

    ReplyDelete
  6. This comment has been removed by the author.

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

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

    ReplyDelete
  9. 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.

    ReplyDelete

Post a Comment

Popular posts from this blog

A sharepoint list view of the current month

Export SharePoint 2010 List to Excel with PowerShell