Skip to content

Commit

Permalink
Update PlatformColorHelper to handle Visual Studio 2013
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Oct 24, 2013
1 parent 8f9fed9 commit d50daa4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PlatformUI/PlatformColorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ private object GetResourceKey(string resourceName)

private static PlatformColorHelper LookupPlatformColorHelper(Type wrapperType)
{
// first try to find the Visual Studio 2013 assembly
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
if (!name.Name.Equals("Microsoft.VisualStudio.Shell.12.0"))
continue;

Type type = assembly.GetType("Microsoft.VisualStudio.PlatformUI." + wrapperType.Name, false);
if (type == null)
continue;

return new PlatformColorHelper(type);
}

// fall back to the Visual Studio 2012 assembly
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
Expand Down

0 comments on commit d50daa4

Please sign in to comment.