Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a 'Custom Designer' Visual Studio 2010 Add-in

A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as a custom editor within Visual Studio.

It would have to appear in the same way as the code editor or the Designer - a tab item, of which there can be many open at once, containing the GUI we use to edit the files. It would integrate with VS's Edit menu. It could use the output window to display messages. It would appear the same as any other editor within Visual Studio.

Right now, I am looking for examples of add-ins that work in a similar way - ideally with source code - to see whether this model would suit our requirements. I am also looking for any documentation or tutorials relevant to creating a VS2010 add-in, or information about VS2008 add-ins if this is still relevant.

Any input is welcome. Thanks!

like image 579
Daniel Situnayake Avatar asked Jun 18 '10 00:06

Daniel Situnayake


People also ask

How do I create a Visual Studio Addin?

To create an add-in in Visual Studio, do the following: From the Visual Studio menu select File and choose New Project. In the New Project dialog box (Figure 1) in the left pane, select Other Project Types, expand the Extensibility type, and in the right pane choose Visual Studio Add-In and then click OK.

What is Form Designer in Visual Studio?

Windows Forms Designer in Visual Studio provides a rapid development solution for creating Windows Forms-based applications. Windows Forms Designer lets you easily add controls to a form, arrange them, and write code for their events. For more information about Windows Forms, see Windows Forms overview.

Can't see Windows Form Designer?

We need to enable the designer in Visual Studio. Go to Tools > Options > Environment > Preview Features and select the Use the preview Windows Forms designer for . NET Core apps option.


1 Answers

You want to look at the Managed Extensibility Framework for VS 2010. Since 2010 is written in .net you can create add on components using it.

Code editor extension for VS 2010.

Working with MEF

Custom Editor Extensions

Update: Since someone asked in a comment, I thought I would post this link on creating add ons for vs 2008: http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx

like image 149
kemiller2002 Avatar answered Sep 19 '22 12:09

kemiller2002