Search code examples
c#.netvsix

Packaging existing Class Library as a Visual Studio Extension


I have a class library with a number of custom code generators which I want to use in my work. Rather than doing all registry manipulations myself (or with regasm.exe) I would like to have a visual studio 2015 plugin that handles all that stuff. Unfortunately I couldn't find any relevant samples anywhere.


Solution

  • I did this a few years back for a single file generator. The following blog entry has the details, and a pointer to the sample code:

      [Building a VSIX Deployable Single File Generator][1]
    

    Note the sample's CodeGeneratorRegistrationAttibute class. This class is responsible for adding the registration info to your .pkgdef, and consequently is how the SFG is registered with the .VSIX.