Don’t show references in Visual Studio’s Text Editor
Visual Studio 2015
Tools > Options
Text Editor > All Languages > CodeLens Uncheck
((\”.+?\”)|(‘.+?’)) in the Find what TextBox
Use Regular Expressions CheckBox
Find and Replace in Visual Studio
How to Generate Code Metrics Data
Analysis menu, then click Calculate Code Metrics for Solution
1. Maintainability Index
+ Measures ease of code maintenance. Higher values are better.
+ No individual method or property should have a maintainability index lower than 40
2. Cyclomatic Complexity
+ Measures number of branches. Lower values are better.
+ No individual method or property should have a cyclomatic complexity greater than 10
3. Depth of Inheritance
+ Measures length of object inheritance hierarchy. Lower values are better.
+ No individual type should have object inheritance hierarchy greater than 4
4. Class Coupling
+ Measures number of classes that are referenced. Lower values are better.
+ No individual type, method or property should have class coupling greater than 10
5. Lines of Code
+ Approximates the lines of executable code (IL code). Lower values are better.
+ Not a good measure by itself
In the root of the solution folder, add file nuget.config with the following content.
<?xml version="1.0" encoding="utf-8"?>
<add key="repositoryPath" value="Nuget Packages" />
CAT.NET is a binary code analysis tool that helps identify common variants of certain prevailing vulnerabilities that can give rise to common attack vectors such as Cross-Site Scripting (XSS), SQL Injection and XPath Injection.
Using CAT.NET in Visual Studio 2010
By default, CAT.NET v1 cannot be run in Visual Studio 2010. The following tweak can be used to enable CAT.NET v1 in Visual Studio 2010.
In notepad, open file
%APPDATA%\Microsoft\MSEnvShared\Addins\Microsoft.ACESec.CATNet.AddIn Add a line “<Version>10.0</Version>” below the line “<Version>9.0</Version>”
Open Visual Studio 2010, and navigate to Tools –> CAT.NET Code Analysis