chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes

Dear support team,

we use TFS 2013 for our builds. We have a custom template (based on the version supplied with your software) and it works quite OK. Some teams within the company prefer to work with Microsoft Fakes, that liberty is fine, they should use what they think suits their needs best. However: because we have assigned the Custom Assemblies location on the build-controller (as written in the TypeMock documentation), the ProfileLinker.dll is breaking our Fakes-builds.

I do NOT register TypeMock when it is not needed and we do stop TypeMock after each test-run just as we should. Still: Fakes-enabled builds fail every time with the error below, unless I actually delete the x86/x64 folders from the Custom Asemblies folder. What can you advise to get this fixed?

Initialization method Project.Data.UnitTests.DataAccess.SomeServiceTest.Initialize threw exception. Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to get address of function SetDetourProvider from library 'C:\Users\TfsBuildSvcAccount\AppData\Local\Temp\BuildAgent\24\Assemblies\x64\ProfileLinker.dll'..

FYI: we use TypeMock 7.5.6.0 as the main version, with some projects still running on older versions like 7.4.1.0.

asked by (9.6k points)
edited by

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 8.0.1.8 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

1 Answer

0 votes

Hi,

Between the Typemock Start and TypemockStop use unly Typemock tests and not Microsoft Fakes.

I recommend you to have 2 scripts one for Typemock and the other for Microsoft Fakes.

 

Looking forward your reply.

 
answered by (320 points)
Dear Inga,

thank you for your reply, but it is not very useful. Let me clarify: all builds that use TypeMock contain a TypeMockStart and TypeMockStop command. Builds that do not use TypeMock (e.g. Microsoft Fakes) do not implement the TypeMockStart and TypeMockStop activities.

I seem to have it working on my version 8 buildagent, but that is my test-environment. I do not want to upgrade my build-controller for my ongoing projects as they are all still using TypeMock 7. On that environment I am still having the issue.

So my conclusion so far is that the TypeMockStop activity is actually keeping ProfileLinker.dll active for some reason. I have the Undeploy attribute set to True. Any advice?
Hi,

The solution to your issue is fixed in version 8 which is available in our website.
...