Quantcast
Channel: Coding4Fun Blog - Channel 9
Viewing all articles
Browse latest Browse all 453

Lessons Learned Creating A Visual Studio Text Adornment

$
0
0

Lucian Wischik, who if you ever get the chance, make sure you catch him presenting, shares some tips and a tutorial on creating a Visual Studio Text Adornment. He takes you from start to finish and the result, your first Text Adornment...

Visual Studio Text Adornment VSIX using Roslyn

A VSIX is a way to install plugins into Visual Studio. The kind of plugin I’m interested in right now is a text adornment. This lets you superimpose things (text, pictures, interactive controls) right on top of a code editor window.

It took me a frustrating day figuring out how to get started. This post is to save everyone else the frustration.

Install the Visual Studio SDK ...

Install Roslyn SDK ...

Create a new VSIX project ...

Add references ...

Add code for the Text Adornment ...

Run it!

Press F5 to run it. It should launch a new “experimental” instance of VS, with your VSIX installed into it. When you open any text document you should see the new adornment in yellow:

image

 

Troubleshooting

... [Click through to read it all and get the source]




Viewing all articles
Browse latest Browse all 453

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>