This article will guide you through the process of running SPCAF in Visual Studio
By default, SPCAF installs a Visual Studio add-in available for Visual Studio 2010 to 2015. This add-in adds a menu entry to the tools menu and to the context menu of Solution and Project. From this menu, you can start the SharePoint code analysis.
Open SharePoint Project
Open a SharePoint project and right click on a project or the solution. The following popup opens and allows you to start the SharePoint code analysis.
Running Code Analysis
Select "Run SharePoint Code Analysis" to analyze the whole solution or a single project, depending on your current selection. SPCAF will compile the project to create the WSP package. After successful compilation, the analysis will start. During the analysis, the output of the analysis process can be found in Output Window under "SharePoint Code Analysis Tools".
If analysis succeeds the errors and warnings are added to the "Error List". Here you can filter the errors and warnings. Double-click on a message will open the file with the error or warning and you can fix it immediately.
If you need more information for an error you can right-click the error message and select "Show Error Help".
The SPCAF documentation opens and describes the error in detail or you can find additional links how to solve the problem.
During analysis, you can cancel the process. Right-click on a project and select "Cancel SharePoint Code Analysis".
SPCAF comes with several rulesets. You can select the ruleset for the analysis in Visual Studio in the menu.
Select the ruleset and click OK.
Additional entries in the SPCAF menu allow you to Create Rule Reports, Code Metrics Reports or Inventory Reports.
The reports are HTML reports and will be opened directly in Visual Studio. Internally the reports are saved to the solution directory in folder _SPCAF.Reports
Create Dependency Diagram
You can also create dependency diagrams in format DGML.
The diagram visualizes the dependencies between the WSP packages (like references between Features, Inheritance of ContentTypes etc.).
Pre-Production | Visual Studio | 2010 | 2012 | 2013 | 2015 | Use | Run