Sunday, October 4, 2009

FIXED - Cannot eliminate warning VSP2013 when Code Coverage is enabled in TeamBuild builds

Code coverage instrumentation warning while processing file [Your Assembly]
Warning VSP2013 : Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this.

This is something I ran into while writing unit tests for a project. The error pops up when you have code coverage enabled for your unit tests.

Workaround:

1) Open the project properties of the assembly you are instrumenting.

2) Go to the Build tab.

3) Make sure the combo configuration selection is set to the Debug (or equivalent) configuration.

4) Set the "Platform target" to x86.
Note: This sets the assembly to be compiled specifically as 32 bit but only the debug assembly so you do not alter the output of your production, deployment assembly.

This will remove the warning when you are performing code coverage on the debug version of your assembly.

No comments: