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 :)