Tag: Visual Studio

Visual Studio 2017 Offerings

  • Visual Studio Community 2017
    • for students, open-source and individual developers
  • Visual Studio Professional 2017
    • for individual developers or small teams
  • Visual Studio Enterprise 2017
    • for teams of any size

 

Advertisements

Visual Studio Code Metrics

How to Generate Code Metrics Data

  • Click 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

References

Microsoft Code Analysis Tool .NET (CAT.NET)

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.

  1. In notepad, open file %APPDATA%\Microsoft\MSEnvShared\Addins\Microsoft.ACESec.CATNet.AddIn
  2. Add a line “<Version>10.0</Version>” below the line “<Version>9.0</Version>”
  3. Open Visual Studio 2010, and navigate to Tools –> CAT.NET Code Analysis