Telerik® JustMock™ by Progress

Symptoms

Resolution

TypeLoadException

Could not load type 'Telerik.JustMock.Profiler' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

It is likely that there are NGENed assemblies for the /Profile scenario. Usually, this can happen when some profiler-based software tries to improve its start-up performance by NGENing system assemblies.

To fix this issue, run "Visual Studio Command Prompt" or "Developer Command Prompt"as an Administrator and execute the following command:

> ngen uninstall * /profile

"Unable to obtain public key for StrongNameKeyPair" exception in non-elevated tests

Such exception may occur if the Crypto\RSA folder does not have Read & execute or List folder contents permissions. To fix this you need to set them manually. The folder can be found here - %appdata%\Microsoft\Crypto\rsa

Missing Visual Studio extension or JustMock menu after successful installation

Try the following:

  1. Open Visual Studio, go to TOOLS -> Extensions and Updates....
  2. If JustMock is in the list of installed extensions, uninstall it from there.
  3. Go to the extensions folder of Visual Studio:

    • default location for Visual Studio 2013: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions or C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\Extensions
    • default location for Visual Studio 2012: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions or C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\Extensions
    • default location for Visual Studio 2010: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ExtensionsorC:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions
  4. Delete all folders that have Telerik.JustMock.* DLLs in them (the name of the folders should follow pattern like this "4uus3xan.ur4")
  5. Run Notepad as an Administrator.
  6. Go to File -> Open and navigate to C:\Program Files (x86)\Microsoft Visual Studio <10.0, 11.0 or 12.0>\Common7\IDE\Extensions
  7. Change the file types to "All Files".
  8. Open extensions.configurationchanged file and save it without changing anything in it(File -> Save). This will refresh the list of extensions that Visual Studio uses.
  9. Go to the JustMock install folder (default is: C:\Program Files (x86)\Telerik\JustMock\Libraries).
  10. Run Telerik.JustMock.VS.vsix as administrator and proceed with the manual installation of the Telerik JustMock extension.
  11. Check if the missing JustMock extension/menu is fixed afterwards.
  12. If the above does not solve the issue, it is likely that you need to repair Visual Studio:

    • Go to Uninstall a Program from the Windows Control Panel.
    • Right click on Microsoft Visual Studio 2010/2012/2013 and select Uninstall/Change.
    • Select Repair/Reinstall from the options.