Reputation: 147
We been getting this on are most up to date systems VS 12 update 4 we have tried setting specific version to false and still get the test failing with this message
Product.Business.Test.Providers.AuthenticationProvider.GivenRequestToStoreAuthenticationState_WhenParametersAreValid.ThenItShouldStoreTheAuthenticationState threw exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.QualityTools.Testing.Fakes, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
can anybody save us from this fake calamity
Upvotes: 7
Views: 18110
Reputation: 11
Adding the below entry in App.config worked for me.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.QualityTools.Testing.Fakes" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Upvotes: 1
Reputation: 21
After days of fighting this problem in TFS Build, I discovered it is really a runtime error when the unit tests are run by TFS. The key is "or one of its dependencies." The
Microsoft.QualityTools.Testing.Fakes.dll
is dependent on
Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
so I copied the framework DLL into the Fakes
directory and checked it in. That solved the problem.
Upvotes: 2
Reputation: 9860
This solved it for me:
Upvotes: 7
Reputation: 111
I was getting a similar issue some time back. Re-referencing the test assembly and recreating the Fakes assembly sorted the issue for me.
Upvotes: 4