Prior to .NET Framework 4.6.2, there was no support for paths longer than MAX_PATH in the managed IO classes. Apps running on .NET Framework 4.6.2 or later that target earlier versions of .NET Framework are able to bypass MAX_PATH with a bit of work, requiring the user to opt-in via registry key and the application via its manifest.
If .NET Framework 4.6.2 or later is not available, the restriction can be bypassed by P/Invoking the relevant Win32 APIs directly with using the long path prefix (\\?\).
It would be nice to allow for long paths to be used transparently, probably by adding some methods to FileUtilities.
Prior to .NET Framework 4.6.2, there was no support for paths longer than
MAX_PATH
in the managed IO classes. Apps running on .NET Framework 4.6.2 or later that target earlier versions of .NET Framework are able to bypassMAX_PATH
with a bit of work, requiring the user to opt-in via registry key and the application via its manifest.If .NET Framework 4.6.2 or later is not available, the restriction can be bypassed by P/Invoking the relevant Win32 APIs directly with using the long path prefix (
\\?\
).It would be nice to allow for long paths to be used transparently, probably by adding some methods to
FileUtilities
.