Visual Studio Extensions
- by John Maloney
I have a project that generates text (representing an interface and a class) based on metadata. I would like to take this generated code and insert it as a new class and interface directly into the currently opened solution under a specific project and directory. I will create the menu tool that will generate the class but what I don't know how to do is gain access to the following items from within my custom Visual Studio Extension:
Iterate the current solution and find a project to dump the generated code into.
Open a new file window within Visual Studio and inject the generated text that comes from my tool directly into that window.
Create a new folder in a specific project within the current solution from within my custom extension.
EDIT -
To clarify I need to open a new file (e.g. Right Click on a Project - Add - New Class) and insert text into it from within my custom Visual Studio Extension.
Thanks