-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Long Path Support in ILSpy
Ever since v7.2-preview1 ILSpy has had support for long paths in Windows 10 iff a certain registry key was set. With our recent move to .NET 6.0 for ILSpy 8, we discovered that .NET internally converts paths to kernel path syntax, which do not have the same restrictions as "user space" paths. This works even without setting the registry key in Windows 10.
Our conclusion was that we wanted to reduce complexity in ILSpy and now will only truncate individual path segments to 255 characters. Another reason was recent customer feedback that we were truncating file names of resources, which would be a breaking change, if the resources were loaded by filename. Note: If the resource filename is longer than 255 characters, it will still be truncated.
- The only restriction that remains is that one "segment" (i. e., file or folder name) must not exceed 255 characters, this is an issue at file-system level and the same for all commonly used operating systems.
- ILSpy and other applications based on newer (.NET Core+) versions of .NET will benefit from this internal path syntax conversion automatically, however, other applications might have problems dealing with long paths. Because of this it is strongly advised to set the
LongPathsEnabled
registry key in Windows 10 and later. As far as we know, Windows 11 still does not come with Long Path Support on by default. - Visual Studio does not support projects that use files with long path names. If you want this to change, please vote and or comment here: https://developercommunity2.visualstudio.com/t/file-path-too-long/654656