Fix – MS Test could not find Unity dll (or other dependencies)

I want to tell you about a problem I came across today:

After writing MS Test tests using Racer I kept getting the same error

image

 

It seems as if my tests could not find Unity dll (one of Racer’s dependencies).

After searching a bit I found the cause of my grief – MS Test has a deployment process enabled by default.

The following text from MSDN cleared everything  – the problem was that the deployment process assumes that you only need the assemblies currently referenced by the test. And so Unity that is referenced by Typemock.Racer.dll wasn’t copied.

 

Because right now I do not need separate deployment environment all I needed to do is to uncheck "Enable Deployment" from the test configuration.

image

TOP