Question

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:

  • Machine.Specifications.dll 0.4.9
  • Machine.Specifications.ReSharperRunner.6.1.dll 0.5.0 (built from GitHub sources)

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?

Was it helpful?

Solution 2

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>

OTHER TIPS

Did you try to download the 0.4.9 binaries from NuGet and use the ReSharper runner from this release? The current source doesn't support these old versions anymore.

For anyone coming at this problem with a Visual Studio 2019 / Resharper 2019.3.4+ setup, what worked is using Resharper's inbuilt extensions manager.

In VS, go to:

Extensions -> ReSharper -> Extension Manager

and search/install "Machine.Specifications for ReSharper"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top