I have a problem with my team build. When running tests locally code coverage is working perfectly, but when running as a part of the Team Build it fails for some of the projects in the solution. When reviewing the build-log, I see: C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets : warning : Instrumentation error while processing file Utilities.dll: C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets : warning : Error VSP1024 : Unable to open file '<path removed>\Utilities.dll' for writing. As mentioned it works for some of the projects in the solution, and I have verified that the Utilities.dll is available in the location mentioned above.
For some projects I also get: Code coverage in-place instrumentation: The binary <path removed>\<dll name removed>.dll was changed during the test run and won't be restored. It may be restored manually from this directory: <path removed>
I managed to make it work by editing the testrunconfig-XML and setting the following to false for all failing files: <instrumentInPlace type="System.Boolean">False</instrumentInPlace>
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.