Search code examples
visual-studio-2013vspackagessms-2012visual-studio-shellssms-2014

Porting Visual Studio VSPackage to SSMS 2012 or 2014


I recently discovered an extension for visual studio that allows you to specify a watermark for the code window. This extension can be found on github here.

https://github.com/nategreenwood/VSEditorBackgroundChangerExtension

As part of a small project I am attempting to get it to work on SQL Server Management Studio. While Microsoft doesn't officially support extending SSMS - they also do not discourage it. Those are their words, not mine.

Looking into the extension\application sub folder under SSMS for SQL Server 2014 it is obvious that Microsoft uses VSPackage to include their own extensions to the Isolated Shell version of Visual Studio that SSMS is built on top of. The manifests appear to be version 1 manifests however.

These show up in the following location on my own box: C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Extensions\Application

Looking for assistance in verifying if this extension can be modified to work with SSMS. I have modified the package manifest in a variety of ways - including rewriting the package as a version one style package and manifest. I can see the package registered under the pkgdef guid that VSIX generates. It says it has been installed. No error messages are thrown, but no image appears either.

Does the Isolated Shell and more specifically, the code window utilized by SSMS to develop and execute TSQL support adornments such as the ones used by this package? Does SSMS support version 2 manifests and VSPackages?

Any advice on how to modify this package to get it to work is appreciated.

My own attempts are further documented here: http://sqljudo.wordpress.com/31-days-of-ssms/ssms-day-30-vspackage-and-ssms/


Solution

  • Looks like there was an official Connect answer on this: https://connect.microsoft.com/SQLServer/Feedback/Details/2602390

    In 2012 and 2014 the old "Addin" mechanism needs to be used, and as of 2016 (general release) the new "VSPackage" mechanism needs to be used (ref: http://blogs.sqlsentry.com/aaronbertrand/plan-explorer-add-in-ssms-2016/ )