Chessar.LongPaths is a .NET library that allows you to enable long path support for the main System.IO classes (and others). It is based on replacing with JMP hooks, internal functions in System.IO.Path (NormalizePath and GetFullPathInternal), which adds prefixes (\\?\ or \\?\UNC\) for paths to files/folders. In this case, your code does not need to directly add such prefixes to the paths. Supported platforms: .NET Framework 4.6.2+
$ dotnet add package Chessar.LongPathsNo README available.