Why does the code in the reports not look exactly like my source code?

This article will explain why your source code will appear different in the reports.

SPCAF performs the analysis of your customization without access to the source code by de-compiling the solution.

Some coding constructs which look different in the source code e.g.

using(SPSite site = new SPSite(url)){


SPSite site = new SPSite(url);







get compiled to the same intermediate language (IL).

For this reason, it is impossible for SPCAF to retrieve the exactly used source code, upon de-compilation.