Home »

Solution for Test Run deployment issue: The location of the file or directory ‘xxxxx.dll' is not trusted.

25. June 2010 by Dave Hawes 0 Comments

This is a short article about a workaround for a really annoying problem I had when trying to run some unit tests in visual studio. The tests would not run because of the following error:

The location of the file or directory ‘c:\projects\bowlingkata\bowlingscorelib_test\bin\debug\Rhino.Mocks.dll’ is not trusted

My situation

I’m working on a large Microsoft Dynamics Crm project at the moment. Dynamics Crm has something called Plugins which fire when something is saved. However they are not the easiest things to unit test so I decided to follow Luis Rocha’s article on how to use Rhino Mock to help.

Looked good, so I created a test but it didn’t run. A quick look on google lead me to David Starr’s article which was the same problem. I tried the unblock thing but it didn’t seem to work.

I asked myself the question, why was this .dll blocked? The answer was because I downloaded it from the Internet onto straight onto my development machine.

The solution

The solution was to download the Rhino.Mocks.dll onto another computer on the network first then copy it to my development machine. This way the Rhino.Mocks.dll came onto my development machine from a trusted source.

After this my tests ran. A real WTF moment!

Comments are closed