SQL Server Management Studio 18 RC1 became available March 28, 2018
This question has already been asked for SSMS 17, but there are slight variations when authoring extensions for different releases of SQL Server Management Studio.
What are the steps to getting a Hello World application up an running in SSMS 2019?
The Latest and Greatest Version 18 iterates off of this and is based on the Visual Studio 2017 shell. Regardless of the edition being used, SQL Server Management Studio only comes in one flavor and boasts backwards compatibility with almost all features from versions 2008 to 2019, including SQL Azure support.
SQL Server stores data using two file extensions: MDF files are the data files that hold the data and objects such as tables, indexes, stored procedures and views. LDF files are the transaction log files that record all transactions and the database modifications made by each transaction.
When installing SQL Server 2014 or SQL Server 2012, SSMS requires Visual Studio 2010 Shell (Isolated) and SSDT requires Visual Studio 2010 Shell (Integrated). According to Microsoft lifecycle policy of Visual Studio 2010, the support ended on July 14, 2020.
Here are the complete steps, adapted from Stefan Timovski's article on How to Create SQL Server Management Studio 18 (SSMS) Extension
Install Visual Studio 2017 with Extensions Toolkit
If you're not sure you have the extensions toolkit, you can open the Visual Studio Installer and modify your current install to make sure you have extensions installed
Create New Extension Project
Go to File New Project (Ctrl + Shift + N)
Choose Extensibility > VIX Project
If you don't have these options, go make sure you did step 1
Add a New Command Item
Add a new item (Ctrl + Shift + A)
Select Extensibility and just for demo purposes grab a custom command
Debug in Visual Studio
The command file will add a menu item to Tools > Invoke Command1. If you hit debug, Visual Studio will launch a Debuggable instance, fully loaded with your current extension. Hit play or hit F5
The first time may take a minute to boot-up, but it should go faster thereafter
The click event handled in located in Command1.cs > Execute
, and you can add breakpoints.
Here's the working message box
Get filepath for SSMS
The default installation path for SSMS 18 should be:
C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
If it's not there, to identify the startup location of any app, you can Shift + Right Clicking on the app icon and select "Open file location"
Set Launch to SSMS
Open up the project properties in VS (Alt + Enter)
Go to Debug > Start External Program and paste in the path
Remove the command line args as they're no longer applicable to SSMS
Set Deploy VSIX to SSMS
The "Extensions" subdirectory should be in the same directory as SSMS. Also, add an extra folder with your project name like this
C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\VSIXProject1
Go to VSIX > and select "Copy VSIX content to the following location"
Set Permissions
Lastly, in order to programmatically invoke any apps on C Drive, you'll need admin privileges, so you need to open Visual Studio in Admin Mode. You can do that by right clicking on the application like this
Hit Run & Debug
Presto! Blamo! Your extension should now be running SSMS
Historically, each extension needed to be whitelisted, but according to the release notes for SSMS 18, one big change (for the better) is
Package IDs no longer needed to develop SSMS Extensions
In the past, SSMS was selectively loading only well-known packages, thus requiring developers to register their own package. This is no longer the case.
Since SSMS 18 uses the Visual Studio 2017 Isolated Shell, many of the extension developer documentation is available under the Visual Studio Extension Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With