Error using long paths in .net 4.7
问题 I have set Enable Win32 Long Paths in the Local Group Policy Editor to Enabled and restarted the computer. And here's the code: string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); for (int i = 0; i < 10; i++) path += "\\" + new string('z', 200); Directory.CreateDirectory(path); I'm getting the error: System.IO.DirectoryNotFoundException: 'Could not find a part of the path 'C:\Users...\Desktop\zzzzzzzzzz... (Which is actually a strange error message.) app.config already