Long path support in Net.Framework 4.7.2 and Windows 10

2.1k Views Asked by At

To solve the problem of limiting paths to 255 characters, the following was done:

  1. Windows 10 2004 includes "Enable Win32 long paths" in the "Local Computer Policy".
  2. In the registry branch: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystem set LongPathsEnabled = 1
  3. Created a project in VS (Net.Framework 4.7.2)
  4. Added manifest file (app.manifest) including longPathAware.
  5. 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

0

There are 0 best solutions below