Hi I need to write a VSIX extension which will monitor the classes currently defined in the open solution. It will look for any classes derived from MyClass and automatically generate source code for a stub class based on properties defined in the matching class. It will then create a new c# file postfix it with autogen.cs and then update the project to add the new file to the project.
Asked
Active
Viewed 50 times
1 Answers
0
Something like this?
Use CodeAnalysis to find all inheritances for MyClass: Finding all class declarations than inherit from another with Roslyn
Use CodeAnalysis to get properties from matching class: Class Members
Create C# file using CodeAnalysis: Roslyn.CodeGeneration
Add file to project: Include a folder and files in the Project using VSIX

sboulema
- 837
- 1
- 10
- 22