unit-testingresharpermspec

Why are my MSpec specifications not recognized by ReSharper?


I know how to integrate MSpec with R#, I'm aware of "blocked DLLs" problem. But I still can't figure out why my tests are not recognized. I'm integrating MSpec in an unusual way though. I do not use NuGet. I have old MSpec build - 0.4.9 - which my tests are built for. I manually create Plugins folder for R# and put the following DLLs there:

After I start VS and open R#'s options dialog the runner is displayed in the Plugins section. But my tests are not recognized. Can the version mismatch be an issue? Does R# have any logging where I can see its communication with the plugin?


Solution

  • I have finally sorted that out. I had to debug the runner as described here - https://github.com/machine/machine.specifications/blob/master/debugging-resharper.txt. And I found out that the runner was built for ReSharper 6.1.37.86, which is not the latest 6.1 release, list is here - http://resharper-support.jetbrains.com/entries/21206508-Where-can-I-download-an-old-previous-ReSharper-version-. The latest 6.1 release is 6.1.1000.82 which is installed on my machine. So the runner just could not find required ReSharper assemblies during startup. I fixed the problem by adding assembly redirects into devenv's config file. The redirects are needed for all ReSharper files the runner depends upon, there are 16 of them in total. Example redirect is:

    <dependentAssembly>
      <assemblyIdentity name="JetBrains.Platform.ReSharper.ComponentModel" publicKeyToken="1010a0d8d6380325" culture="neutral"/>
      <bindingRedirect oldVersion="6.1.37.86" newVersion="6.1.1000.82"/>
    </dependentAssembly>