Visual Studio 2010 Code Coverage - Cannot find the back up file, created by instrumentation utility
I am trying to run code coverage in VS 2010 and I am running into the following error. No coverage information is generated.
Code coverage in-place instrumentation: Cannot fu开发者_如何学运维lly backup the binary 'MyProject.dll'. Cannot find the back up file, created by instrumentation utility: 'MyProject.dll.orig'.
Check which artifacts are selected for code coverage for your test run config - it's quite well hidden:
- Under menu: Test -> Edit Test Settings select your active test setting
- In the Test settings Dialog select the Data and Diagnostics tab
- Select the Code Coverage item, and then hit the Configure button above
- This opens up the Code Coverage Detail window. Check the MyProject.dll that is giving you problems: Does the dll exist? Is it a debug build? Is it signed? Do you have any tests which hits this project?
According to SP's answer to a similar question at msdn, this error can occur if the project or a file in the project does your project does not contain instrumentable code - eg, interfaces only, or resources only. Is that the case in your project?
精彩评论