When I try to run my Unit Test project, I get the following error:
Could not load file or assembly \'ASSEMBLY_NAME, Version=1.0.0.0, Culture=neutral, Pub
I tried all above to no avail. Finally, in the csproj i changed
<Private>False</Private>
to
<Private>True</Private>
on the references and all tests passed.
Maybe enabling assembly loading logging can give you a hint about why your assembly cannot be loaded.
http://msdn.microsoft.com/en-us/library/e74a18c4.aspx
I had the same issue and found that copying the dll's to the GAC resolved the issue. Though I still don't understand why it doesn't use the referenced projects assemblies.
Check Build->Configuration Manager...
menu. All projects should have the same platform and column Build
checked.
Also you can take a look into output of the build (Output
window), it usually states more clearly which file could not be found.