I suggest you ...

Fix 260 character file name length limitation

The 260 character limit on file paths really gets in the way of having a deeply-nested project hierarchy. It's only there as backwards compatibility with the old school APIs, and has no place in any sort of modern development environment.

We should be able to work with file paths of whatever size we want.

2,973 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Steve Leigh shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    We’ve removed the limitation from the BCL for the basic file manipulation functionality (CRUD). You can find more details here:

    https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2/

    Feedback welcome!

    At the same time, I’ve filed a more scoped item to track the end-to-end scenario that I believe most of you are asking for here:

    https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/33659146-allow-building-running-and-debugging-a-net-appl

    Immo Landwerth
    Program Manager .NET

    343 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • William Bosacker commented  ·   ·  Flag as inappropriate

        For those complaining about MSBuild, Visual Studio, Team Foundation Server, or any other application, you are in the wrong place. This topic is for the .NET Framework ONLY! Which BTW, was fixed to support long file paths.

      • Robert J. Good commented  ·   ·  Flag as inappropriate

        2017-12-20 Confirmed this still happens with VSTS builds on a TFS 2017 on-prem build agent. Only when Visual Studio Build task is used.

        But, no compile error with MSBuild.exe, and no error when opening the erroring \_work\ solution from the build machine console in Visual Studio. Possible this is intermittent, and possible this is only specific to VSTS/TFS builds.

      • David Hunter commented  ·   ·  Flag as inappropriate

        I'm a bit confused by this issue. It's marked as completed but as many people have pointed out from VS users perspective it appears to still be a problem. Was this closed because .NET is now fixed? My understanding is that MSBuild is still not based on this issue https://github.com/Microsoft/msbuild/issues/53.
        Is there a separate user voice issue for all of VS working. By working I mean I can create a project with a very long path and actually build it in the IDE without getting this error?

      • William Bosacker commented  ·   ·  Flag as inappropriate

        This is working. If anyone is having trouble, you will need to research it yourself. There is a blog post from one of the Microsoft teams that explains everything in detail. This only works on Windows 10 with the appropriate patch, the appropriate settings active, and only applies to .NET Framework and .NET Core. The Win32 API has always supported long file paths.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Error still happening in Visual Studio 2017 Professional.

        is anyone from MS gonna take this seriously?

      • Nafeez Abrar commented  ·   ·  Flag as inappropriate

        Still getting the same error.

        The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

        Tested in

        Microsoft Visual Studio Enterprise 2017
        Version 15.4.2
        VisualStudio.15.Release/15.4.2+27004.2006
        Microsoft .NET Framework
        Version 4.7.02556

      • William Bosacker commented  ·   ·  Flag as inappropriate

        @Nak C++ projects have always had access to the Win32 API, and thus the ability to use paths beyond the 260 character barrier. You just need to use the correct methods, and use them correctly.

      • Corey Lean commented  ·   ·  Flag as inappropriate

        I too had this error when copying deeply nested files. After searching a lot on the internet I found that GS Richcopy 360 had good reviews and I tried it. Now all my problems are solved related to file transfer and FTP. You can also try it, it helps!

      • William Bosacker commented  ·   ·  Flag as inappropriate

        @Ray Rizzuto
        Once Microsoft releases (RTM) a new version of Visual Studio (in this case Visual Studio 2017), they drop support for all previous versions of Visual Studio, with the sole exception being security updates. Therefore, it is highly unlikely that Microsoft would make any feature changes to Visual Studio 2015, or earlier.

      • Ray Rizzuto commented  ·   ·  Flag as inappropriate

        It is great that APPLICATIONS built using .Net 4.6.2 can access long paths now. Is there a way to tell VS2015 to allow the compiler to accept long paths and not give errors like this:

        51>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1898,5): error MSB4018: The "GenerateBindingRedirects" task failed unexpectedly.
        51>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1898,5): error MSB4018: System.IO.PathTooLongException: 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.

      • Russell de Pina commented  ·   ·  Flag as inappropriate

        Then why am I getting this error in VS 2017 for a cloud service built with .NET 4.6.2?

        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. XXXXXXXXXXX C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\Microsoft.WindowsAzure.targets 1058

      • Sophia Jason commented  ·   ·  Flag as inappropriate

        Windows does not allow to perform any actions on file path more than 250. Let me tell a really easy method to solve this. Use GS Richcopy 360. It solved all my problems too. Try it, and you will be glad that you did!

      • Anurag Singh commented  ·   ·  Flag as inappropriate

        I was also having this problem when I was transferring my files from my previous PC to my new laptop. After researching a lot I found that Windows doesn't support file path names more than 255 characters. I had to solve this issue quickly, my friend suggested me to use GS Richcopy 360. This software not only solved my problem of file path names but also provided great transfer speed due to its 100% multi threaded file transfer feature. Try it, maybe it could help you all too!

      • Mia Lee commented  ·   ·  Flag as inappropriate

        This is one the most irritating problems ever encountered by me after my wife! LOL!
        Jokes apart, when I try to copy files with path names longer than 255 character, Windows prompts error to me. I had to solve this problem ASAP. After searching a lot I found GS Richcopy 360 works best for these problems. I can rename files, move them delete them! But the features list doesn't stop there only. Some of my favorite features include Some of my favorite features include long path name support which is really important when copying large files, 100% multi threaded file transfer (as the company claims, you can witness the boost in transfer speed yourself), pre scheduled file transfer, email notification when the transfer is done, NTFS support, and many more exciting features. I am currently using the enterprise version of it. Try it hope it helps you all!

      • William Bosacker commented  ·   ·  Flag as inappropriate

        If you follow the directions at the URL posted above:

        https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2/

        AND, are working on Windows 10 (or Windows Server 2016) with the proper profile setting set, it will work. If you are working on any other version of Windows, or have not turned on the profile setting, it will not work.

        P.S. There is only one person that says anything about "Long Path Tool", and that is the author. He regularly SPAMs advertisements for his tool that look like normal posts from different people. Including every single post on this thread.

      • John commented  ·   ·  Flag as inappropriate

        Welcome to the ******** that is Windows. Even after all these years we are still ******.

      ← Previous 1 3 4 5 17 18

      Feedback and Knowledge Base