4

I created extension for Visual-studio. When I build project in "Debug" mode I get error with message The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. But in "Release" mode it being build successfully.

In Debug mode project builds in folder by this path: "C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\15.0_ed6a412fExp\Extensions\CompanyName\ProjectName\1.3 + all sub folder of project" in sum this path over 260 symbols.

I tried next options to solve this problem:

  1. I set enabled for "Win32 long path" in "local group Policy Editor" dialog.
  2. In file manifest of project I set next configuration
<application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings xmlns:ws2="https://schemas.microsoft.com/SMI/2016/WindowsSettings">
        <ws2:longPathAware>true</ws2:longPathAware>
    </windowsSettings>
</application>

This steps have not been helped me. Can I solve current problem?

Thanks.

  • Possible duplicate of [Visual Studio unknown build error. The fully qualified name must be less than 260 characters](https://stackoverflow.com/questions/11434206/visual-studio-unknown-build-error-the-fully-qualified-name-must-be-less-than-26) – Gagan Burde Jan 31 '19 at 10:15
  • Moving project into root folder does not help me. Please read all description. I wrote 'In Release mode it being build successfully'. – Oleksiy Kovalchyk Jan 31 '19 at 10:33
  • Hi, please try to create a new solution under the same root folder and check this issue persist or not. Meanwhile, I found some others recommended to install the long path tool. – Sara Liu - MSFT Feb 05 '19 at 08:04

2 Answers2

0

You can try this

  1. run regedit.exe as administrator
  2. locate [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
  3. change data value [LongPathsEnabled] (DWORD) to "1"
  4. close regedit and restart Windows

Taken from link

I.pattern
  • 75
  • 1
  • 8
0

Man from MSDN Support suggests try this :( Best way to resolve file path too long exception

The source where he suggests https://social.msdn.microsoft.com/Forums/vstudio/en-US/784bc16e-52be-41e5-8cfd-990101e391fe/the-fully-qualified-file-name-must-be-less-than-260-characters-and-the-directory-name-must-be-less?forum=msbuild

Also, usefull links from devs https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/2156195-fix-260-character-file-name-length-limitation Look at the second commentary from VS dev

THUS, using .net 4.6.2 can solve the issue i suppose

NoImagination
  • 178
  • 1
  • 8