I've got a .NET 3.5 class lib that I am trying to write some automated tests for but I'm getting the following error when running any tests in the solution:
Test method Common.Tests.CommonTests.TestMethod1 threw exception: System.IO.FileNotFoundException: Could not load file or assembly 'Library.Common, Version=0.0.1.22004, Culture=en-AU, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I'm fairly new to unit testing so I'm stumped.
I've compaired the references between the lib and the tests project and the only difference is that the tests project references the MS unit test DLL.
Edit to clarify
I used the test creation wizard from within my 'Library.Common' project so the test project has the reference to the Library.Common project. I've cleaned and built the solution too, that's not the problem.
Library.Common.dll is also in the bin\Debug folder of my test project output.
Either go to Solution Explorer (Ctrl +Alt+L) and right click on Solution 'BasicMath' and click on Build Solution or go to Build Menu (Alt + B) and Click on Build Solution. Choose Test Menu -> Run -> All Test or instead of this step, you can follow the given step also.
Unit tests run one at a time. There is no parallelism.
Found the problem, I had set the AssemblyCultureAttribute in the AssemblyInfo.cs file in my Library.Common project. Once removing it the tests run.
Now to actually learn how to use that attribute!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With