Need to work with Microsoft.QualityTools.Testing.Fakes

We were getting this on most modern VS 12 update 4 systems, we tried setting certain version to false and still get the test fail with this message

Product.Business.Test.Providers.AuthenticationProvider.GivenRequestToStoreAuthenticationState_WhenParametersAreValid.ThenItShouldStoreTheAuthenticationState Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Qestuality7Foakes.0 or one of its dependencies. The installed assembly manifest definition does not map the assembly reference. (Exception from HRESULT: 0x80131040)

can someone save us from this fake disaster

+3


source to share


4 answers


I was getting a similar problem a while ago. Re-linking the test build and recreating the Fakes build sorted out the issue for me.



+4


source


This solved it for me:



  • deleting bin , obj and FakesAssemblies folder
  • make sure the specific build version Microsoft.QualityTools.Testing.Fakes is set to 'false'
  • rebuild test project
+5


source


After several days of struggling with this issue in TFS Build, I discovered that it is indeed a runtime error where unit tests are run by TFS. The key is "or one of its dependencies".

Microsoft.QualityTools.Testing.Fakes.dll

depends on

Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

so I copied the DLL structure into the directory Fakes

and checked it. This fixed the problem.

+2


source


Adding the below entry to 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>

      

0


source







All Articles