Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/

like image 227
RThomas Avatar asked Sep 01 '14 06:09

RThomas


People also ask

How do I use Visual Studio Code instead of SSMS?

How Do I: Use Visual Studio Code instead of SSMS? Using Visual Studio Code as a replacement for Sql Server Management Studio is very easy. Once you have downloaded and installed VSCode ( download it here ), you need to add the mssql extension in Visual Studio Code, which you can find here.

What is VSPackage in Visual Studio?

Thank you. VSPackages are software modules that extend the Visual Studio integrated development environment (IDE) by providing UI elements, services, projects, editors, and designers. Explains how to specify the VSPackage location to the Visual Studio shell.

Is SSMS bad for vs?

I've had problems with VS before after installing SQL "over the top" of it. SSMS installs as part of SQL Server, so that shouldn't be a problem. Unless you are installing SQL 2014 or later.

Is SSMS a part of SQL Server?

SSMS installs as part of SQL Server, so that shouldn't be a problem. Unless you are installing SQL 2014 or later. From that version SSMS is now a separate install.


1 Answers

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/ )

like image 154
Tao Avatar answered Oct 14 '22 03:10

Tao