When building, particularly for release versions, VS can add a lot of characters to paths with its output files and if you end up with a path over 260 characters you can get build errors caused by the path being too long (file inaccessible etc errors).
A solution is to enable long file path support in windows.
On Windows 10/11
Use regedit to alter the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
(Type: REG_DWORD) must exist and be set to 1. You will likely need to reboot for the new setting to take effect.
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.