There is registry approach which can be used at least for Windows 10:
Value of the parameter HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Type: REG_DWORD) should be set to 1.
You don't even need top restart anything (IDE or PC).