clang-build fails with "Illegal character in Path"
See original GitHub issueWhen I clang-build a VS Project, it fails for me with the following message (German Windows):
--- CLANG TIDY STARTED ---
Get-ChildItem : Illegales Zeichen im Pfad.
In C:\users\uid38621\appdata\local\microsoft\visualstudio\16.0_cec81720\extensions\z2xrjrot.1qu\Tooling\v1\clang-build.
ps1:545 Zeichen:12
+ $slns = Get-ChildItem -recurse -LiteralPath $pathToCheck -Filter " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-ChildItem], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.GetChildItemCommand
Cannot find given project(s)
--- CLANG TIDY FINISHED ---
I tracked down the issue to the following line of code:
I believe, this is due to adding \\?\
and running the command in PowerShell x86. While I can run the command in x64 Powershell, it fails in x86:
I literally just removed the code adding the \\?\
prefix for making it work:
I didn’t draft a PR, as there is probably a reason for this code to exist. However it looks to me like it either needs to be removed, or the Addin must make sure it runs in x64 Powershell.
- Win 10 x64
- VS 2019
- Project configured with CMake
- Powershell 5
Name Value ---- ----- PSVersion 5.1.19041.2364 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.2364 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Issue Analytics
- State:
- Created 8 months ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Visual Studio build error "Illegal characters in path"
go to obj\Debug folder then find yourProject.csproj.FileListAbsolute.txt file open it then delete what you found in building the project. In my ...
Read more >MSBuild error: MSB4014 "Illegal characters in path" #8875
MSBuild error: MSB4014 "Illegal characters in path" #8875 ... error MSB4014: The build stopped unexpectedly because of an internal failure.
Read more >Illegal Characters In Path Error : r/VisualStudio
Everytime i try and create the project i get an error saying "Illegal Characters in path". Restarted, updated and tried again to no...
Read more >Illegal characters in path. - Microsoft Q&A
I am trying to create a new project through following procedure but visual studio is throwing exception.
Read more >Illegal characters in path when creating class ...
... class will appear “Illegal characters in the path” (Add “existing project” works) Then I repaired VS and restarted,but I still get the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @mariru27
I tried it out, but it didn’t work:
Hi @FlorianReimold,
Thank you for reporting this issue, and for provided information We are looking into it and working towards a fix. We will keep you updated as progress is made.
Best regards, Marina