To solve the problem of limiting paths to 255 characters, the following was done:
- Windows 10 2004 includes "Enable Win32 long paths" in the "Local Computer Policy".
- In the registry branch:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystemsetLongPathsEnabled= 1 - Created a project in VS (Net.Framework 4.7.2)
- Added manifest file (app.manifest) including
longPathAware. - The fragment
<AppContextSwitchOverrides value = "Switch.System.IO.UseLegacyPathHandling = false; Switch.System.IO.BlockLongPaths = false" />is added to App.Config
But PathToLong exception still occurs when working with System.IO