Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

kwcsprojparser generates error(s) when folder names use special characters

If you are using Visual Studio with a C# project, and create a folder from within the IDE containing a MSBuild reserved character(s), it will be referenced in the underlying .csproj file with escaped encoding for any special characters in the name. Specifically, the characters shown in the table below will be converted to their ASCII representations:

Character ASCII
% %25
$ %24
@ %40
' %27
; %3B

When kwbuildproject consumes the build specification created from the .csproj file by kwcsprojparser, the encoded folder names are processed and the '%' characters are further ASCII-encoded for downstream processing. This double-encoding causes kwbuildproject to generate errors because the folders cannot be found.

The effect of the double-encoding is as follows:

Intended folder name Folder name in Visual Studio After processing by kwbuildproject
$remainder_of_folder_name %24remainder_of_folder_name %2524remainder_of_folder_name
To solve this problem, you can use kwbuildproject's --replace-path option to re-interpret the build specification as it is being consumed:
kwbuildproject --replace-path <old_path>=<new_path> -o <tables_directory> <build_specification>
where:
  • <old_path> is the file path generated after processing by kwbuildproject
  • <new_path> is the expected file path
For example:
kwbuildproject --replace-path "C:\MyProject\source%2524remainder_of_folder_name"="C:\MyProject\source\$remainder_of_folder_name" -o tables buildspec.out

For more information, see Replacing the path to your source files