SQL Server Management Studio (SSMS) is based on the Visual Studio shell. What is puzzling sometimes is that features that are present in Visual Studio are not present in SSMS. One of these relates to themes.
“Out of the box”, Visual Studio looks like this:
When you write code, the windows look like this:
Some people don’t like the “whiteness” of the whole screen and find darker colors easier to work with for long periods. In Visual Studio, you can change this. In Tools, then Options, you can change the theme:
The default here was the Blue theme. There is an extra contrast theme, and a Light theme (can’t say I love that one), and a Dark theme. Note that once I choose the Dark theme, I see this:
OK, so what about SSMS? When I go into the same menu items, I see this:
All there is to choose from is the Blue theme that I was using, and the Light theme that I really don’t like. It’s curious that even the higher contrast Blue theme isn’t there.
So what’s going on?
Well the team has gone out of the their way to remove the other options. A quick search around the configuration files in the folder:
<strong>C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio</strong>
leads you to two interesting files: ssms.pkgdef and ssms.pkgundef.
Opening ssms.pkgdef in NotePad++ I can see this:
It’s basically a list of where things are but note there’s also now info about the background telemetry that SSMS performs.
In ssms.pkgundef, I can see this:
It’s basically a list of all the things that are normally there that they have decided to remove. Notice, sadly, that macro support is one of them. I’ve never understood why we don’t have macros. I think they’d be useful.
Another day, I’ll try to experiment with enabling macros.
Regardless, scrolling down we find the culprit for our missing theme:
So this is no accident. The team has deliberately decided to remove it. I can only imagine that’s because they aren’t sure if it will work properly (or know that it won’t) and they don’t want to have to test or fix it.
We can enable it, by commenting out that line, and saving it. (We’ll have to be an administrator to be able to save it).
And when we restart SSMS, it’s now there:
And notice that it now works:
Well, at least, almost works. It seems fine for editing code, but notice that Object Explorer doesn’t play along with a dark theme, nor does many of the items that you launch from within it:
But if you really, really want to edit code with a dark theme all day long, this might be enough for you.