Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a plugin for Visual Studio [closed]

I'm a fan of style cop but hate the way it dosn't have a more producticve way of resolving errors.

So I'm thinking, to give me a wee project to keep me happy in my spare time, of creating a Visual studio plugin to automate some error fixing.

Has anyone authored a plug in before and got any useful links, hints, experience to share?

like image 613
AJM Avatar asked Nov 12 '09 09:11

AJM


People also ask

How do I open a VSIX File in Visual Studio?

Open in VisualStudio the folder that contain the "nameFile. vsix" file. File, Open Folder..., click right in the "nameFile. vsix" into de VisualStudio, and click in install extension VSIX.

How do I enable auto close tags in Visual Studio Code?

File > Preferences > Keymaps, Search 'Auto close' and click on install. If it doesn't work, reload the plugin.


2 Answers

You can write an addin to Visual-Studio on it's addins model directly: http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx

It requires some hard work since the extension model is not very intuitive.


You can also do it using DXCore: http://blogs.microsoft.co.il/blogs/dhelper/archive/2009/06/17/how-to-write-a-simple-dxcore-plug-in.aspx

It's a little bit more simple, and the plugins engine is free.


Last option is to write plugins using Resharper, I never did it but it has reach plugins among Style-cop plugin.

I had experience with both of the first options. First one, VS extensions model, is very hard to work with. It's an old API coming from previous versions of VS, based on classic COM and miss a lot of documentation. Second option, DXCore plugins, is much more intuitive, has reacher API but it also lack some documentation. Another issue is that it requires installation of ~30MB. Good luck :)

like image 116
Elisha Avatar answered Oct 19 '22 11:10

Elisha


The new Visual Studio 2010 Beta 2 and the SDK have projects designed for this kind of thing. The extensibility options with the new WPF interface will be a great way to get this done:

http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx#Extensibility

There is going to be a lot of cool things coming out with 2010

The videos are also really good on : http://msdn.microsoft.com/en-gb/vstudio/bb507746.aspx but these are for older Visual Studio versions

like image 20
Phill Duffy Avatar answered Oct 19 '22 11:10

Phill Duffy