Search code examples
c#visual-studio-2017visual-studio-extensionsvsix

How to get current theme for Visual Studio 2017


I'm looking for a way to retrieve the current theme for the VS 2017. The older versions of VS stored in Windows Registry but the VS 2017 stores it in its own private registry hive. Is there any way to get it in my VSIX extension? Maybe there is a library function?


Solution

  • Visual Studio 2017 maps private registry hive to regular registry keys when running. From your VSIX extension inside the VS 2017 process you can just read HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0 and it will get you theme settings.