Insights and discoveries
from deep in the weeds
Outsharked

Friday, June 12, 2015

Using Color Theme Editor in Visual Studio 2015 RC

For inexplicable reasons, Microsoft has put out a release candidate for Visual Studio 2015 without updating the color theme editor. 


This may seem like a minor point, but most developers I know are somewhat particular about their development environment. We go to great pains to make it look and feel exactly the way we want to. There are so many scenarios that can be configured. It can take a long time to get things just the way you like them.

So when I first fired up VS 2015 RC1 and discovered that it looked like Visual Studio 2010, and there was no theme editor extension, I just shut it down and figured I'd wait it out. I was using a custom theme as my starting point, and had heavily customized it from there. If it was even possible to replicate it without the theme editor, I didn't know where to begin.

There is a solution.

Actually, it's one I've written about before.

You can use the VS2013 color theme editor extension in VS2015. It doesn't work perfectly, but I was able to migrate my settings from VS2013 without too much trouble, and once that's done you don't need to touch it again.


1. Export settings


Fire up VS2013. 

  • Choose Tools -> Import and Export Settings.
  • Select "Export selected environmental settings" and click Next.
  • Unselect everything by clicking the partially-checked box next to All Settings.
  • Expand  Options, Environment and check Fonts and Colors, and click Next.
  • Change the target path if desired, and click Finish to export your color settings.
If you are using a custom theme from the VS color theme editor, you need to export it too.
  • Choose Tools -> Customize Colors. 
  • Select the them you are using. In my case it's a custom theme called Monokai. 
  • Click the Edit Theme icon (the center one).
  • Click the "export" icon (circled in the picture to the right).
  • Change the file type to "Theme Package Definitions (*.pkgdef)" and save it somewhere. You're done with this part.

2. Migrate the extension


Following the same instructions from two and a half years ago that I wrote up to migrate Ultrafind, migrate the color theme editor extension to VS2015. This time around the source is 12.0, the target is 14.0, and the extension is in a folder called 1rdkntxh.iwn (at least on my computer, it was pretty obvious which it was just by peeking in the folders). Copy this thing to the 14.0 folder.

If you exported a custom theme as I did above, copy the .pkgdef file you exported into the Colors subfolder where you copied the extension itself. This isn't where custom themes lived before, but rather promotes it to an "installed theme." This was necessary as the "import theme" feature doesn't seem to work properly under VS2015, however, just putting it there works fine.

3. Enable it


Start Visual Studio 2015, and choose Tools -> Extensions and Updates. Select "Visual Studio 2013 Color Theme Editor" and click Enable. Restart VS as directed.

4. Import old settings


The theme editor should load up right away. Select your theme of choice.

Now import your general fonts & color settings that you previously exported using Tools -> Import and Export Settings

5. Awesome! Now I can function again. 

... so does it work for other stuff I can't live without too?


Maybe?

I tried Productivity Power Tools and it crashed as soon as I loaded a project.  Oh well.

As for Ultrafind? After it disappeared of the face of the earth a couple years ago, I eventually found a great alternative called Entrian Source Search -- not free but well worth the $29 price. In the year or so since I've been using it, it's probably cost me about $0.000001 per use. It's indispensible. 

Here's hoping this gets a VS2015 update soon.


5 comments:

  1. VS 2015 Theme Editor is already available since RTM was released on the 20th of July. However, the settings export is done badly. I too have Monokai theme but not as the "theme" but as imported settings. What happens when I import same settings into VS 2015? Barely anything. Most of the colours remain standard. Too bad...

    ReplyDelete
  2. The Visual Studio settings depend on the color theme editor and specifically reference it by name. So AFAIK you can't just import settings, it needs to interact with the plugin to obtain the settting data.

    I just tried switching to the new VS2015 plugin and indeed the theme import blows, it seems as if the configuration has changed as it complained about not recongnizing what appeared to be most or all of the profile colors. It doesn't seem to work right whether I import a .vstheme or a .pkgdef file.

    However, if you just copy the "pkgdef" export from VS2013 into the plugin folder:

    C:\Users\{username{\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\eonjfuta.kvt\Colors

    It seems to work fine. Basically same instructions as above for using the VS2013 pluigin. I switched to Monokai, then imported the VS options export afterwards, and everything is back to normal.




    ReplyDelete
    Replies
    1. ... I take that back... while some of the major elements remain, it looks broken.

      I think I'm going back to my VS 2013 hack! Yeah it seems pretty much not backwards compatible, what a shame. At least we can still use the 2013 extension as described here, seem to be no issues.

      Delete
  3. I have been looking for ultrafind for sometime but it appears that is no longer available. Do you happen to still keep it as a zip file? If so, I'd be glad to receive a copy of it
    K.

    ReplyDelete
    Replies
    1. I don't think I have it any more. I ended up getting a license for Entrian Source Search which is far superior to Ultrafind and well worth the $29. Highly recommend it as an alternative.

      Delete