Moq.dll is not trusted

Came across this today while working through the NerdDinner example in the first chapter of the new MVC book from Wrox.  This chapter is available free from Scott Gu’s Blog.  Have to say it’s an excellent introduction to Microsoft’s MVC and luckily the book, which I’ve had on back-order has finally shipped to me today so there’ll be no hold-up going through the rest of it!

Anyway, coming back to the problem, the chapter talks briefly about mocking frameworks and suggests using moq  in the tutorial.   Download it, unzip it and reference it in the project – fine.   Then when you run the unit tests ….. they don’t, run that is.   MOQ.DLL is not trusted so the tests won’t execute.  

Fortunately it’s a very easy fix, locate the dll in your source directory, right click and select Properties.   You should see something like this :

The properties for the moq.dll

The properties for the moq.dll

Look at the bottom at the Security information.  Unblock the dll and apply the changes.     You should then be able to continue with your tests.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s