An error occurred while calculating code metrics

Description of the problem

When I tried to execute code metrics in Visual Studio 2013 for a C # project (Analyze -> Calculate Metrics for Solution), I get the following error:

"an error occurred while calculating code metrics" 

This error occurred even for a newly created project, so it was not associated with some problematic links.

Decision

To solve this problem, I ran the following command as an administrator:

 regsvr32 "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLangproj.olb" 

Conclusion

  • I checked that this problem does not occur in the newly installed VS 2013 (installer with update 4 enabled), which means that this may be due to the upgrade to "update 4".
+6
source share
2 answers

The problem arose because some of my Visual Studio projects referred to a link for which the source was not available, as shown in the figure below:

enter image description here

Removing these links allowed the code matrix functionality to be activated again.

+13
source

To solve this problem on Windows

  • Open the command window by clicking the "Start" button. In the Search box, type Command Prompt, then right-click Command Prompt in the list of results and select Run as Administrator in the selection menu.
  • At the command prompt, paste the following command:

    regsvr32 "C: \ Program Files (x86) \ Common Files \ microsoft shared \ MSEnv \ VsLangproj.olb"

  • Click "Back" to run the above command, you need to show a successfully registered dialog box

+5
source

Source: https://habr.com/ru/post/981356/


All Articles