I would like to create a Visual Studio add-in to generate files.
For example, I would like to create something similar to the "Add Controller" dialog in ASP.NET MVC. This appears when you right-click on the "Controller" folder in an MVC project in Visual Studio.
However, instead of creating a controller file, I would like to create "Handler", "Request", and "Reply" classes within a folder, for my implementation of a service bus.
Creating these classes over and over again is becoming a bit of a chore, so I'd like to automate it. Is an add-in the way to go here? Do I also need to use macros and/or T4 templates?
It would be nice I could run the add-in by right-clicking on a folder and then choosing Add->Handler or something similar. I'm sure there must be a way to do something like that, but I haven't found a good resource yet through Google.
For reference, I've already looked at these web pages for info:
- http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx
- http://msdn.microsoft.com/en-us/library/80493a3w.aspx
- http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx
- http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx
- http://www.codeproject.com/Articles/16515/Creating-a-Custom-Tool-to-Generate-Multiple-Files
- http://www.olegsych.com/2010/03/t4-tutorial-integrating-generated-files-in-visual-studio-projects/