4

I'm editing a custom application with Visual Studio Shell 2015 as base. It comes with 3 defaults themes:

  • Blue
  • Dark
  • Light

Color theme options

Is there a way to remove the Dark theme?

I searched Stack Overflow and the most relevant question is this one: How to get current used color theme of Visual Studio

XBox2000
  • 103
  • 7
  • 1
    Don't know about Shell apps, but for VS itself you can remove the Dark theme by deleting the key `{1ded0138-47ce-435e-84ef-9ec1f439b749}` under `HKCR\Software\Microsoft\VisualStudio\14.0_Config\Themes`, or just renaming it to an "illegal" name such as `// {1ded0138-47ce-435e-84ef-9ec1f439b749}`. Of course, you should check it's not the currently active theme prior to removing it. – dxiv Jul 23 '20 at 23:19
  • Thank you dxiv. I tried it and it indeed remove the Dark option in Visual Studio. However when I do the same for Shell app, it regrows the registry key whenever I restart the computer – XBox2000 Jul 24 '20 at 01:05
  • 1
    [Elements of the Isolated Shell](https://learn.microsoft.com/is-is/visualstudio/extensibility/elements-of-the-isolated-shell?view=vs-2015) points to registry settings being restored from `.pkgdef` files, but I haven't played with shell apps so can't give advice there. – dxiv Jul 24 '20 at 02:00
  • Glad it helped, and +1 for taking the time to post an answer proper. – dxiv Jul 24 '20 at 05:06

1 Answers1

4

With the help of dxiv, I found out how to remove default theme:

Find the file *.pkgundef in your application. Add this line:

[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]
XBox2000
  • 103
  • 7
  • Since you have a workaround about your issue, please do not forget to [mark your own answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). – Mr Qian Aug 06 '20 at 09:06