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
0 votes
We are running a TFS 2012 build using the TypeMock custom activities of TypeMockStart and TypeMockStop. Seemingly randomly we receive the following error: Exception Message: Access to the path '<xxxxxx>TypeMockdProfileLinker.dll' is denied. (type UnauthorizedAccessException). This happens when TFS tries to clear the directory for the build - so the previous build must have left ProfileLinker.dll locked. But the previous build shows it succeeded. This continues to happen unless we restart the TFS build agent. After we restart the TFS build agent, the next build succeeds.

Possible un/helpful information:
- Looking at the TFS output file of the previous build shows that both TypeMockStart and TypeMockStop were successfully called
- The unit tests for this project can take over 10 minutes
- The solution contains 56 projects, 18 of which are unit test projects
- On another build of a different solution we were able to create this same scenario by stopping the build during the execution of the unit tests - possibly skipping the TypeMockStop activity (did not verify).

Any help you can provide would be appreciated.
asked by BretB (880 points)

12 Answers

0 votes
We are seeing this error daily again. When I thought it went away before we did have a bit of a lull in our development. I didn't think this would have completely eliminated the issue - but it did for a while. Now that things have picked up again it is happening every day again.

I double-checked the Build settings to make sure that code coverage had not been accidentally turned back on - and it had not.

Any more ideas on how to avoid this?

Thank you.
answered by BretB (880 points)
0 votes


I’ve attached a link to our new version – just run the installer and you should be good to go.

Let us know if it solved the problem.

answered by Bar (3.3k points)
edited by Bar
I'm sorry this has taken so long.  Through an unusually lengthy procurement process we were able to upgrade to v7.5.6.1.

Unfortunately upgrading did not resolve this issue for us.  We still receive the following error several times a day and have to restart our TFS build agent to overcome it.

Access to the path '<full path here>ProfileLinker.dll' is denied.