JustCode is not loading in Visual Studio 2011

Telerik’s JustCode it’s an awesome product, it’s a very lightweight extension that may lack some features (sorry, I won’t mention names) but it does its job, and that’s good. Almost a month ago Telerik announced JustCode support for Visual Studio 2011, that’s awesome, specially when I decided to try out Visual Studio 2011 in a pristine installation inside a virtual machine (and yeah, I know other extensions already announced the same).

installer

I downloaded the JustCode internal build and the installer correctly detected my Visual Studio 2011 installation, sweet, everything finished without any problem. Then when I started Visual Studio 2011 I realized JustCode didn’t load… and all what I get it’s a very verbose exception in the JustCode’s output window:

ERROR 2011-10-23 00:23:38.842 :  [HResult: 80131602]
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
[and a lot of more lines...]

I submitted some bug tickets, write to some Telerik’s developers but no right answers, you know, the usual.

Well, I decided to see what’s happened, so I did what every other developer would do, attach your debugger to Visual Studio and then found the issue. JustCode is trying to load the assembly Microsoft.VisualStudio.CSharp.Services.Language, Version=10.0.0.0 but in a machine without Visual Studio 2010 this assembly didn’t exist, it’s unique of a Visual Studio 2010 installation. Of course, I’m using a Virtual Machine snapshot, I don’t have a previous version installed. The assembly present in my VS2011 installation is Version=11.0.0.0.

The easy way to fix it? Go to a Visual Studio 2010 installation, copy the assembly Microsoft.VisualStudio.CSharp.Services.Language.dll from the Common7 directory and paste into your Telerik’s JustCode directory, that’s all, JustCode now it’s going to load. Maybe this would cause some other problems, but come on, it was my first attempt! =)

Probably a better way to fix it would be using assembly binding redirection, or taking care of the fact that maybe a previous installation it’s not present maybe in the installation process. I’m just saying!

Note for developers in general: it’s a good idea to test your installation in a pristine installation before release it to the wild, just to see what’s happening, you know, just in case =)

  • Estuardo Hernandez

    Exelent… thanks so much for sharing it.

  • Vladimir Dragoev

    Hi Cristian,

    Thank you for helping us resolve this issue. The ticket you have submitted is assigned and is taking care of. We will shortly provide a fix for it and will announce it publicly. I will answer you in the ticket as well.

    Thanks again and keep the helpful feedback coming. It’s much appreciated.

    Vladi,
    The Telerik team

  • Vladimir Dragoev

    Hi again Cristian,

    I’m happy to follow up and let you know that the issue with Visual Studio 11 you describe is fixed in the latest official 2011 Q3 release of JustCode. Please give it a try and let us know what you think.

    Kind regards,
    Vladi
    The Telerik team