SSMS ecosystem

Building the sample add-in

Step 1: Get the sample source code

You can download the source code for a sample add-in from GitHub. 

Step 2: Install SIPFramework

Download and run the EXE installer. SIPFramework hooks into SSMS and is launched whenever SSMS starts. It is responsible for starting your add-in and providing it a clean interface to SSMS.

Step 3: Compile the sample source code

Once the NuGet package dependencies have been restored the solution should build. If it doesn't please get in touch.

.Net runtimes and SSMS add-ins

Add-ins using .NET 4.0 runtime can't be loaded in SQL Server Management Studio 2008R2 and earlier. NET 3.5 runtimes can be loaded into all SQL Server Management Studio versions.

You can workaround this limitation by loading your add-in into a child process, this Red Gate open source project could help. This project was used by the add-in SQL Scripts because its CEF UI needs to be hosted in a separate process. SQL Scripts will also be open-sourced very soon.

Step 4: Register the compiled sample with SIPFramework

You need to make an entry in the Registry to tell our SIPframework where to load your add-in from. You should create the registry entry in either:

  • 32-bit machines: HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SIPFramework\Plugins
  • 64-bit machines: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SIPFramework\Plugins

Create a new String Value (REG_SZ) with a unique name and set the value to the path of the sample's SampleSsmsEcosystemAddin.dll.

For example: C:\Users\david\Documents\SampleSsmsEcosystemAddin\SampleSsmsEcosystemAddin\bin\Debug\SampleSsmsEcosystemAddin.dll

Step 5: Start SSMS

You should see the sample add-in loaded. If not see trouble-shooting an add-in. If it has loaded then why not learn how to debug an add-in.

Troubleshooting

The framework's log is written to this location: \AppData\Local\Red Gate\Logs\Ssms

You can increase the log level by editing your Registry. Create a string called "LogLevel" with the value "All" at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SIPFramework.


Didn't find what you were looking for?