dimanche 22 novembre 2015

Microsoft Fakes: Team Build throws IO file not found exception

I am using Microsoft Fakes for my unit testing. On my local dev machine, i can create a fake assembly of a class library and everything works fine. But when check-in the team build on the build server throws "System.IO.FileLoadException: Could not load file or assembly 'Business.DataAccess.Core, Version=19.0.0.9999, Culture=neutral, PublicKeyToken=925fe695533b6fca' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

In my local dev machine 'Business.DataAccess.Core.dll' version is 19.0.0.9999, but on the build server it will be get a proper version number such as 19.0.0.1250.

Business.DataAccess.Core.fakes xml file is as follows. I have removed the version tag.

<Fakes xmlns="http://ift.tt/1nzIu3W">
  <Assembly Name="Business.DataAccess.Core" />
</Fakes>

I tried both by committing FakeAssemblies folder and not committing it. In both times its not working. My assumption was that fake assemblies will be created at compile time. But it's not working.

How can i get team build to run my unit tests using Microsoft Fakes.

When i fake just the EntityFramework.dll and commit the fake assemblies it works. This proves our build server is equipped with testing MS fakes. Build server has got VS 2013 ultimate version installed.

Much Appreciated!!!

Aucun commentaire:

Enregistrer un commentaire