Microsoft CodeLens Code Health Indicator

Microsoft DevLabs Free

This is an experimental CodeLens Indicator that shows information about the code being edited.

(14) Review
Visual Studio
2013
Download (14,704)
11/7/2014
0.3
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (14)
Q and A (19)
Sign in to write a review
Sort by:

by mmm sipdev | September 11 2015

I just wanted to write a response to LukePuplett (I have no connection with the proj just thought it funny nobody answered him)

The icons in the codelens line and the icon in the popup winder display different things. The red, down facing icon in codelens means that the measure has gone down since the last edit. Meanwhile even thought it's gone down, it can still be a green block since the measure is still within good threashold.

by JRSkerrett | March 02 2015

Seems pretty usable. It definitely communicates good information. I'm a little dodgy on how the scores are calculated. I've got some simple and highly reused code that only gets a score of 72. I haven't been able to create a method with a score between 80 and 99.

by BrandonJohnson | February 25 2015

I just installed this extension to evaluate its usefulness. So far it appears that this will be very helpful. VB does work but appears buggy.

by Michel Bretschneider | November 04 2014

Great Tool, saves some time as you don't have to run the analysis all the time manually just to check you didn't sacrificed maintainability for that new fancy feature.
Works even for web projects without a project file, which is neat as those get messy a lot faster than "normal" projects.

by LukePuplett | October 17 2014

The colour of the dot was often not the same as the colour in the pop-up detail, and the metric seemed not to match up either, so I'd see red dots everywhere but were they yellow?

It seemed to marked simple 10 line, arrange, act, assert, unit tests with red dots, so the rest of my code stood no chance.

Uninstalled it.

by David Beaumier | October 10 2014

A must have tool! Although the description says "Only works on C#", it does work with VB.NET (at least as of March 2013).

Here's some improvement suggestions:
- Explain what the numbers between parenthesis mean. For example, when one see "Maintainability Index: 41 (-25)" it should be obvious what (-25) means.
- Somehow explain what is the target value (or range) for each metric. For example, what is an acceptable range for the cyclomatic complexity measure?
- Change measure's color (in the Codelens area, not just in the pop-up) when it's outside of the target range in order to highlight the problem (maybe could use green, yellow, and red).
- Measures could be refreshed more often (or changes could be detected). I sometimes have to close-reopen a file to have the score recomputed.

by codoherty | October 03 2014

I noticed procedures that were not unduly complicated were being flagged making the procedures very distracting. It would be much better if you could configure the index rate level before flagging (color-coded underlines) procedures occurs.

by Xavier Raboteur | July 11 2014

Need it for VS 2013 Professional please :)

by Sascha Herne | June 20 2014

Please make this awsome tool available for visual studio 2013 ultimate.

by Ranjith Venkatesh - Work | March 31 2014

Why is it not available for VS 2013 Professional?

by André Obelink - MVP | January 29 2014

I see now that only C# is supported. It does work a little in VB.NET. I hope for full support VB.NET soon.

by Robert Furtner | November 06 2013

very good tool

by TechTurt | October 31 2013

Sweet indicator above your methods telling you their code metrics. Nice to see at a glance.

by Kaj Bonfils | October 30 2013

Great Tool...

It does what it prommises...


My team could use a lot more from the same drawer!

Sign in to start a discussion


  • Metrics differ from VS metrics
    2 Posts | Last post January 05, 2016
    • Hi! I just discovered this extension and installed it in VS2015. It appears to work fine and seems very useful. However, a couple of things confuse me:
      1. The numbers given are different from what I get through Analyze->Code Metrics, even for e.g. Lines of Code. How can this be?
      2. What are the plus-minus numbers? E.g. Cyclomatic Complexity: 10 (+9).
      
      Thanks!
    • Hi !
      The Cyclomatic complexity numbers are different because the "Old" metrics tools give too high numbers, it doesn't understand lambdas for one thing.  The CodeHealth is equal to other tools, like NDepends, for most of what I have checked. 
      I haven't seen any difference in line numbers, it mostly seems to match up.
      
      The numbers in parentheses are the result of the recent changes you have done.  So in your case (+9) means Cyclomatic Complexity has increased by 9. 
  • Not working on windows 10
    1 Posts | Last post October 27, 2015
    • 10/27/2015 9:45:20 AM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'Microsoft CodeLens Code Health Indicator' requires a version of the .NET Framework that is not installed.
         at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForValidDotNetFramework(IExtension extension)
         at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForInstallBlockers(InstallableExtensionImpl extension, IInstalledExtensionList modifiedInstalledExtensionsList, Boolean isNestedExtension, Boolean& olderVersionInstalled)
         at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallInternal(InstallableExtensionImpl extension, Boolean perMachine, Boolean isNestedExtension, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten)
         at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
         at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)
      
  • Not working
    2 Posts | Last post September 29, 2015
    • 2015-09-27 17:18:37 - 	Identifier      : a8fef2b6-f187-40ef-bf29-3b8bc745c8c9
      2015-09-27 17:18:37 - 	Name            : Microsoft CodeLens Code Health Indicator
      2015-09-27 17:18:37 - 	Author          : Microsoft Corporation
      2015-09-27 17:18:37 - 	Version         : 0.3
      2015-09-27 17:18:37 - 	Description     : This is an experimental CodeLens Indicator that shows information about the code being edited.
      2015-09-27 17:18:37 - 	Locale          : en-US
      2015-09-27 17:18:37 - 	MoreInfoURL     : 
      2015-09-27 17:18:37 - 	InstalledByMSI  : False
      2015-09-27 17:18:37 - 	SupportedFrameworkVersionRange : [4.5]
      2015-09-27 17:18:37 - 
      2015-09-27 17:18:37 - 	SignedBy        : Microsoft Corporation
      2015-09-27 17:18:37 - 	Certificate Info : [Subject]
        CN=Microsoft Corporation, OU=MOPR, OU=OPC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
      
      [Issuer]
        CN=Microsoft Code Signing PCA, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
      
      [Serial Number]
        33000000CC776171D4B17BA1280001000000CC
      
      [Not Before]
        2014-04-22 19:39:04
      
      [Not After]
        2015-07-22 19:39:04
      
      [Thumbprint]
        9DD77A79F7124D8DB128A526833CF3760FCB7794
      
      2015-09-27 17:18:37 - 	Supported Products : 
      2015-09-27 17:18:37 - 		Microsoft.VisualStudio.Ultimate
      2015-09-27 17:18:37 - 			Version : [12.0]
      2015-09-27 17:18:37 - 
      2015-09-27 17:18:37 - 	References      : 
      2015-09-27 17:18:37 - 		-------------------------------------------------------
      2015-09-27 17:18:37 - 		Identifier   : Microsoft.VisualStudio.MPF.12.0
      2015-09-27 17:18:37 - 		Name         : Visual Studio MPF 12.0
      2015-09-27 17:18:37 - 		Version      : [12.0]
      2015-09-27 17:18:37 - 		MoreInfoURL  : 
      2015-09-27 17:18:37 - 		Nested       : No
      2015-09-27 17:18:37 - 
      2015-09-27 17:18:37 - 
      2015-09-27 17:18:37 - Searching for applicable products...
      2015-09-27 17:18:38
    • Which version of Visual Studio are you using?
      Do you have Visual Studio 2013 and Visual Studio 2015 installed on your machine?
      Are you able to see other CodeLens indicators?
  • not work on .net framework 40/4.5.1
    2 Posts | Last post September 11, 2015
    • Hi
      
      Excuse me, It is not written with .net framework 4.0 above?
      
      Thank you.
    • This extension does work with Projects using .NET framework 4.0 and above.
  • VS 2015 Support
    2 Posts | Last post September 02, 2015
    • Is this supported in VS 2015 Enterprise? I have it installed for 2013 and works great. VS 2015 Enterprise shows code lens but doesn't show the health indicator. 
    • I have published the VS 2015 version of this extension - https://visualstudiogallery.msdn.microsoft.com/54b2682c-47f4-48ee-9d6d-190402330c49?SRC=Home. Please try it out and send me your feedback.
  • Please, update for 2015
    4 Posts | Last post September 02, 2015
    • Miss it
    • We miss it too. We got used to it in our team and love that feature! Please provide an update! Thanks.
    • We too. This is too great to be abandoned. If you won't port it to 2015, why not putting it up to github and let the community do the work. I don't expect the port to be that much work.
    • I have published the VS 2015 version of this extension - https://visualstudiogallery.msdn.microsoft.com/54b2682c-47f4-48ee-9d6d-190402330c49?SRC=Home. Please try it out and send me your feedback.
  • Install Error:target framework
    3 Posts | Last post July 02, 2015
    • When I installed, I got a erroe for not install target framework.
      I use win 8.1 and VS2013 Ultimate.
      
      2015/06/25 11:52:19 - 検出されたインストール済み製品 - Microsoft Visual Studio Ultimate 2013
      2015/06/25 11:52:20 - ID 'a8fef2b6-f187-40ef-bf29-3b8bc745c8c9' の拡張機能は Microsoft Visual Studio Ultimate 2013 にインストールされません。
      2015/06/25 11:52:20 - 検出されたインストール済み製品 - Microsoft Visual Studio Premium 2013
      2015/06/25 11:52:20 - 検出されたインストール済み製品 - Microsoft Visual Studio Professional 2013
      2015/06/25 11:52:20 - 検出されたインストール済み製品 - Microsoft Visual Studio 2013 Shell (Integrated)
      2015/06/25 11:52:21 - 次の対象製品が選択されました...
      2015/06/25 11:52:21 - 	Microsoft Visual Studio Ultimate 2013
      2015/06/25 11:52:21 - 
      2015/06/25 11:52:22 - 拡張機能の Microsoft Visual Studio Ultimate 2013 へのインストールを開始しています...
      2015/06/25 11:52:22 - インストール エラー : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: 拡張機能 'Microsoft CodeLens Code Health Indicator' には、インストールされていない .NET Framework のバージョンが必要です。
         場所 Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForValidDotNetFramework(IExtension extension)
    • Do you have VS 2015 CTP 5 installed on the machine?
      
      We have seen this error in CTP5 and it has been fixed in CTP6.
    • I can't install VS2015 CTP5.
      But, I installed MS SQL Server 2016 CTP2.
  • Don´t exist in VS 2013 Community
    2 Posts | Last post May 19, 2015
    • This tool when enabled for VS 2013 Community, is very important!
    • CodeLens (the basic infrastructure & other indicators) is not enabled in VS 2013 Community. So the Code Health Indicator will not appear in VS 2013 community.
  • Error Installing
    2 Posts | Last post March 11, 2015
    • Getting the following error installing:
      This extension is not installable on any currently installed products.
      
      Visual Studio Professional 2013
      Version 12.0.31101.00 Update 4
      
      Error log:
      3/9/2015 4:13:29 PM - 	Supported Products : 
      3/9/2015 4:13:29 PM - 		Microsoft.VisualStudio.Ultimate
      3/9/2015 4:13:29 PM - 			Version : [12.0]
      3/9/2015 4:13:29 PM - 
      3/9/2015 4:13:29 PM - 	References      : 
      3/9/2015 4:13:29 PM - 		-------------------------------------------------------
      3/9/2015 4:13:29 PM - 		Identifier   : Microsoft.VisualStudio.MPF.12.0
      3/9/2015 4:13:29 PM - 		Name         : Visual Studio MPF 12.0
      3/9/2015 4:13:29 PM - 		Version      : [12.0]
      3/9/2015 4:13:29 PM - 		MoreInfoURL  : 
      3/9/2015 4:13:29 PM - 		Nested       : No
      3/9/2015 4:13:29 PM - 
      3/9/2015 4:13:29 PM - 
      3/9/2015 4:13:29 PM - Searching for applicable products...
      3/9/2015 4:13:29 PM - Found installed product - Microsoft Visual Studio Professional 2013
      3/9/2015 4:13:29 PM - Found installed product - Microsoft Visual Studio 2013 Shell (Integrated)
      3/9/2015 4:13:29 PM - Found installed product - Global Location
      3/9/2015 4:13:29 PM - Found installed product - ssms
      3/9/2015 4:13:29 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
         at VSIXInstaller.App.InitializeInstall()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.Execute()
      
      
    • CodeLens is available only in Visual Studio Ultimate. You cannot install this extension on Visual Studio Professional.
  • Error about .NET framework
    3 Posts | Last post February 19, 2015
    • While installing I got an error this could not be installed because of .net framework not available. 
      
      1/30/2015 01:00:44 PM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'Microsoft CodeLens Code Health Indicator' requires a version of the .NET Framework that is not installed.
      
      This is because 2015 has been installed. Other VISX suffer from this too. WebEssentials VISX has solved this.
      
      Marcel
      
    • Marcel,
      
      Which version of VS 2015 & VS 2013 do you have installed on your machine?
      If possible, please move to the latest CTP of VS 2015 and try.
      
      Mathew.
    • Update:
      This is an issue in Visual Studio 2015 CTP5. This has been fixed and will be available in the upcoming Visual Studio 2015 CTP6.
1 - 10 of 19 Items