Tuesday, January 15, 2008

NMock2 was Blocked

I ran across an interesting problem today when I downloaded NMock to assist with some unit testing in Visual Studio.  Suffice to say that when I referenced the NMock assemblies, compiled and attempted to run the tests, the test manager simply aborted with the following error:

NMock Not Trusted

"Failed to Queue Test Run... [because]... the location of the file 'NMock2.dll' is not trusted."

This error seemed pretty strange to me because the assembly wasn't located on a network share but simply on my local machine. The location on disk should be trusted, right?

I located NMock2.dll on disk, opened the file properties dialogue and noticed the following at the bottom of the general tab:

Blocked NMock

So Windows Vista detected that I had downloaded the NMock DLLs from the Internet in a zip archive. When I extracted the assemblies, Windows marked the assemblies as un-trusted code.

Anyway, if you experience this issue, simply click the Unblock button and the assembly will become trusted. You may need to restart Visual Studio before the tests will run.

Technorati Tags: , , , ,

Thursday, January 10, 2008

Code Signing for Windows Vista

John Robbin's blog on Wintellect has some useful advice for working with authenticode certificates. It's an interesting read for any Vista developer. Click here for more...