VSIX

Prevent (some) MEF loading crashes with a Roslyn Analyzer

If you’re working on a MEF (Managed Extensibility Framework) application, you’re probably familiar with its ups and down. On the one hand, MEF is a powerful plugin system, that’s a pleasure to work with once you know it well. On the other hand, we all encountered strange failures that originated with MEF. Such failures are a nightmare …

Prevent (some) MEF loading crashes with a Roslyn Analyzer Read More »

VSIX: Identify mouse hover location in the editor

I recently encountered an interesting challenge: The need to identify the word currently under the mouse cursor in the Visual Studio editor. This turned out harder than I thought. But after some work and a few tricks needed to make it work well, the result is this:   Let’s see how this can be done.

Add Menu Item to a VS extension old ‘Package’ (as opposed to newer ‘AsyncPackage’)

This tutorial relates to the old  Microsoft.VisualStudio.Shell.Package. This should be used for older Visual Studio versions (VS 2013 and older). The Package  is loaded synchronously on the UI thread and can cause responsiveness issues. Synchronous loading of packages will stop being supported in a future version of Visual Studio. For VS 2015 and later, it’s recommended to …

Add Menu Item to a VS extension old ‘Package’ (as opposed to newer ‘AsyncPackage’) Read More »

Visual Studio 2017 Extension tutorial 8: Add UI in the indicator margin with Glyphs

Tutorial Table of Contents: Part 1: Introduction to VS extensibility Part 2: Add Menu Item Part 3: Add command to context menu and get selected code Part 4: Show a popup Window Part 5: Highlight code in Editor Part 6: Follow a span of code with TrackingSpan Part 7: Insert buttons between text characters with …

Visual Studio 2017 Extension tutorial 8: Add UI in the indicator margin with Glyphs Read More »

Visual Studio 2017 Extension tutorial 7: Insert buttons between text characters with Adornments

Tutorial Table of Contents: Part 1: Introduction to VS extensibility Part 2: Add Menu Item Part 3: Add command to context menu and get selected code Part 4: Show a popup Window Part 5: Highlight code in Editor Part 6: Follow a span of code with TrackingSpan Part 8: Add UI in the indicator margin …

Visual Studio 2017 Extension tutorial 7: Insert buttons between text characters with Adornments Read More »

Visual Studio 2017 Extension development tutorial part 6: Follow a span of code with TrackingSpan

Tutorial Table of Contents: Part 1: Introduction to VS extensibility Part 2: Add Menu Item Part 3: Add command to context menu and get selected code Part 4: Show a popup Window Part 5: Highlight code in Editor Part 7: Insert buttons between text characters with Adornments Part 8: Add UI in the indicator margin …

Visual Studio 2017 Extension development tutorial part 6: Follow a span of code with TrackingSpan Read More »

Visual Studio 2017 Extension development tutorial part 5: Highlight code in Editor

Tutorial Table of Contents: Part 1: Introduction to VS extensibility Part 2: Add Menu Item Part 3: Add command to context menu and get selected code Part 4: Show a popup Window part 6: Follow a span of code with TrackingSpan Part 7: Insert buttons between text characters with Adornments Part 8: Add UI in …

Visual Studio 2017 Extension development tutorial part 5: Highlight code in Editor Read More »

Visual Studio 2017 Extension development tutorial, Part 4: Show a popup Window

Tutorial Table of Contents: Part 1: Introduction to VS extensibility Part 2: Add Menu Item Part 3: Add command to context menu and get selected code Part 5: Highlight code in Editor part 6: Follow a span of code with TrackingSpan Part 7: Insert buttons between text characters with Adornments Part 8: Add UI in …

Visual Studio 2017 Extension development tutorial, Part 4: Show a popup Window Read More »

Visual Studio 2017 Extension development tutorial, Part 3: Add to context menu, Get selected code

In part 2 of the tutorial we created a simple VS extension with a single Menu item. The extension will eventually be able to add code documentation in a separate file (.cs.cdocs) and view it in a nice Heads-Up display. The tutorial explains every step of the way to build such an extension. For starters, …

Visual Studio 2017 Extension development tutorial, Part 3: Add to context menu, Get selected code Read More »