Registering a VSX Package programmatically
The regpkg utility located under %VSSDK_InstallDir%\%Version_Number%\VisualStudioIntegration\Tools\Bin\ is a managed assembly and provides the necessary API to do the common operations with VSX Packages that you usually do from the command line.
The RegPkg class is the one that exposes the API to deal with VSX Packages and it has the following useful methods signatures:
- Register(string fileName, string regRoot, RegistrationMethod registrationMethod)
- Unregister(string fileName, string regRoot, RegistrationMethod registrationMethod)
- CreateReg(string fileName, string regRoot, RegistrationMethod registrationMethod)
- CreateWix(string fileName, string regRoot, RegistrationMethod registrationMethod)
One important thing is that the regpkg utility isn't redistributable via the VS SDK license agreement, because of that this only apply to scenarios with the VS SDK installed.
There are a couple of *design-time scenarios* where this could be really useful, for example VSSDK Assist uses this approach to register/unregister a VSX package
Pablo