Answered Team Build: Code coverage only working for some assemblies

  • Monday, September 17, 2007 11:08 AM
     
     
    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>

    Does anybody know what might be wrong?

All Replies

  • Tuesday, September 18, 2007 7:33 AM
     
     Answered
    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>