viernes, 18 de noviembre de 2011

Getting "Error Unit Test Adapter threw exception: Unable to find assembly 'The assembly'" when running your tests

Here is another issue that I faced and want to share with you so you don’t waste hours on this, please share this to anyone who will be using w7 64 bits.
I was getting exception below running tests that were already running:
“Error Unit Test Adapter threw exception: Unable to find assembly 'The assembly’”
And I had to do below steps to fix this, I don’t think this is the best way to do it but so far is the only way I’ve found to fix it, link at the bottom contains more info.
Assuming VS2008 is installed on your development computer in "C:\Program Files\Microsoft Visual Studio 9.0", create the folder "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\UnitTestAssemblies". Copy YourTested.dll to that new folder.
Next, you need to edit the file "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTestHost.exe.config". There should be a line that looks like:

Change it to:

Restart VS2008 and run your unit tests again.
Always keep the assemblies in UnitTestAssemblies up-to-date. If you build a new Csla.dll, then copy it to UnitTestAssemblies before trying to execute your unit tests.
http://forums.lhotka.net/forums/t/5297.aspx

No hay comentarios: