I have additional information to add to this issue, that probably will help you to analyze the problem in more detail.
As soon as I stop and start the build-agent, I can build a fakes-enabled project just fine, it turns "green" and all tests pass. If I then run a "TypeMock enabled project" it builds fine as well, and the tests pass, it's "green". But as soon as that project has been built and I try to do another run of the Fakes-enabled project, I receive similar errors as indicated in my initial post and below.
Note: I have just upgraded to the latest 22.214.171.124 version of TypeMock to see if that might help. So to be clear on this: TypeMock somehow messes with the build-environment, causing that all my Microsoft Fakes builds fail. Please advise?
Test method Proxy.Test.Project.ServiceAgentTest.SearchTest threw exception:
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to get profiler module handle 'C:\Users\BuildSvcAccount\AppData\Local\Temp\BuildAgent\1\Assemblies\x86\ProfileLinker.dll'. The specified module could not be found ---> System.ComponentModel.Win32Exception: The specified module could not be found