Solution 5. How to Enable Long Path Support in Windows 10 (1607) and higher
In Windows 10 Anniversary Update (1607), it became possible to disable the MAX_PATH limit on the Windows operation system level without using prefix \\?\. By default, this feature is disabled.
To enable the built-in support for long paths in Windows 10/Windows Server 2016, you can use the Regedit.exe editor to set the LongPathsEnabled parameter of REG_DWORD in the registry key HKLM\SYSTEM\CurrentControlSet\Control\FileSystem with a value 1.
You can change this registry parameter with the following PowerShell command:
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
Or you can enable long path support via Group Policy Editor (Win + R \ gpedit.msc) Computer Configuration > Administrative Templates > System > Filesystem. Enable the policy Enable NTFS long paths.
For the changes to take effect in both cases, the computer needs to be rebooted. After a reboot, users and programs will be able to work without restrictions with files, the length of the path to which exceeds 256 characters. Now the files will only be affected by the NTFS file system file path limit of 32767 characters.
However, in some applications, the MAX_PATH check is embedded in the code. About the max file path restrictions for .Net developers, see the Solution 7 below.