I've got an app where long path support is now needed. It's running on Windows 10 post-1607, long paths have been enabled via group policy. When the app was targeting 4.6.1, it threw the PathTooLongException what a System.IO.FileInfo object is instatiated for a file with a very long path. The app is now targeting .NET 4.6.2, which is supposed to support long file names. I also enabled long paths on the Windows 10 machine in group policy and double checked that the value is being properly set in the registry.
With the app targeting 4.6.2, the app no longer throws the exception when a FileInfo object is instantiated. However, things still do not work properly with paths over 260 characters. To be clear, when I say it does not work, I mean that when the object is instantiated by the long name, dates stay at default, and the Length value indicates: "'FIfileInDir.Length' threw an exception of type 'System.IO.FileNotFoundException'".
I have already tried to set, within <runtime> in the app.config:
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false" />
That did not help.
Is the setting not properly applying on my system? Is there something I else I need to do to make long path support work?
Thanks in advance.