And November 2022
Long file path issues in Windows 11 Pro with Microsoft VS Code and File Explorer
I spent way too long debugging a compile error in MS VS Code (64bit version 1.66.2). It would fail with 'file not found' or 'unable to access file' errors. The workspace is located in "C:\Users\UserName\Documents\My Workspaces\firmware", with several levels of nested source folders below.
Initially, I got several linking errors due to Controlled Folder Access protection using the Ransomware protection built-in to Windows Security. I whitelisted ar.exe and as. exe, but the errors persisted. I even turned off Ransomware protection. Seeing a thread online about long file paths reminded me I hadn't enabled that on Windows 11 yet (fresh install), so I changed the following settings and rebooted the PC:
Registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled set to 1.
Group Policy: System "Configuration>Administrative Templates>System>Filesystem>Enable Win32 long paths" enabled.
About that time I noticed an issue with not being able to delete or rename files on an SMB share that were in a deep path. If I went to the other system and moved them up a few folders I was again able to rename the files.
Both of these scenarios work fine from my Windows 10 Pro PC. My Windows 11 Pro PC is a fresh install (Version 21H2 Build 22000.613).
So I believe Windows 11 isn't respecting my Long Paths settings. As a final test, I moved my VS Code Workspace folder to system drive root (C:\firmware) and it compiled without error.
I've seen other questions on here about Windows 11 path length issues that were brushed away because they were encountered using non-Microsoft 3rd Party software, but this is all built-in File Explorer and Microsoft's own VS Code product.
My question is, how do I actually allow long file paths in Windows 11 Pro?
Windows for home | Windows 11 | Files, folders, and storage
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
77 answers
Sort by: Oldest
-
Anonymous
2022-11-16T12:16:40+00:00 -
Anonymous
2022-11-17T17:25:36+00:00 FYI: I opened a support incident with Microsoft on this today. It will be interesting to see what they have to say about this.
-
Anonymous
2022-11-25T06:52:10+00:00 It's quite frustrating that this is still not working. Please, let us know what you hear back from Microsoft.
-
Anonymous
2022-11-27T17:23:26+00:00 FYI: I opened a support incident with Microsoft on this today. It will be interesting to see what they have to say about this.
I'm interested in what they report back to you as well. It's definitely not working in Windows 11 22H2 Education 64-bit either and I don't understand why. I have the same setting enabled too, LongPathsEnabled, set to DWORD value of 1.
-
Anonymous
2022-11-30T17:41:20+00:00 Seems like this is taking forever. So, here's an update on what's going on:
The first guy they assigned it to went on vacation. Yesterday the new guy left some voicemail to a wrong number. Turns out the wrong phone number is on the ticket (digits transposed).
Hopefully I'll have something useful to report soon.