Missing Assembly on First-Time Execution of R# Tests

I observed that when executing my R# test project the first time after I open the respective solution, the tests fail. Actually, what fails is the setup of the test environment:

Failed to start the tests host. 216 exceptions were thrown.
#001: The JetBrains.Platform.ReSharper.IDE assembly could not be located in the C:\%path to solution%\KaVE.VsFeedbackGenerator.Tests\bin\Debug directory.
#002: <same problem for other R# dependencies>

I see two strange things here:

  1. the test project's name (and folder) is actually called "KaVE.VsFeedbackGenerator.RS8Tests\". I have another, completely unrelated unit-test project named "KaVE.VsFeedbackGenerator.Tests". But there's not even a reference between them...
  2. when reexecuting the test, everything works fine. I never see this error again, until I close and reopen the solution.

It's not that this is really a big issue for now, but it's at least annoying.
Anyone with any ideas about why this happens?

Best regards,

Comment actions Permalink

It's possibly the test runner getting its knickers in a twist due to two SetUpFixtures with the same name and namespace, but in different projects. If you check the AssemblyInfo.cs file, you'll see a TestEnvironmentAssembly class. This sets up the ReSharper test environment, and returns a list of assemblies to load - by default, the assembly that owns the test fixture. Because both test projects will have the same type name and namespace, the test runner might be trying to run it as well. I'd suggest renaming one of the fixture classes.

Are both test projects building to the same location?

Comment actions Permalink

There is only one SetUpFixture. The second test assembly contains only normal unit tests and, thus, no R# fixture setup. Both projects build to different locations.

I renamed the class anyways, to make sure it's not some leftover from before the renaming that's causing the problem. I'll give it a try and report back, should the problem still appear.



Please sign in to leave a comment.