How to extend CodeLens

codelens, visual-studio, visual-studio-extensions

Solution

As @RichardBanks says, officially CodeLens is not extensible. Technically I think it may be possible at the moment. Look for `*CodeSense*.dll` in the visual studio directory for hints. There is no documentation at present and the API can still change going forward.

I suggest you'd venture into this for research purpose only, distributing any 'plugin' seems like a very bad idea until Microsoft opens up the API, which they probably will.

Problem

I'm currently writing a tool to help maintain unit and integration tests (coded tests). I've started extending Visual Studio to make the developer experience nicer, which got me to notice the new-ish CodeLens feature. The stuff I'm currently showing as a tooltip should probably actually be part of the CodeLens info. Question: Does anyone know how to extend CodeLens in Visual Studio? Thanks.

Original source