Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio add-in for C#-development

I want to write my first Visual Studio 2010 add-in. My aim is to create an add-in that helps to automatically generate code for things like:

  • implement superclass constructors
  • create delegation methods for composed object
  • etc.

Of course, in order to know what to generate, my add-in must have a knowledge of the code-file the user is going to insert generated code into. (classes, base-classes ...)

My first thought was to use a C#-parser. Is this the right way to go? Isn't there any .NET-Framework part, COM-Object or whatever "built-in"?

Thank you in advance.

P.S: Is noticed that CSharpCodeProvider's class Parse() method has not been implemented by Microsoft yet. -_-

like image 545
Simon Avatar asked Apr 26 '26 02:04

Simon


1 Answers

You can get a lot of info from the MS Visual Studio Extensibility site. This post from the Visual Studio blog may also get you started with dealing with the in memory code file.

like image 176
slugster Avatar answered Apr 27 '26 14:04

slugster