Team build provides ability to build both Release and Debug bits in the same build. If there are unit tests, it will run tests for both Release bits and Debug bits. Sometimes, we might want to run tests or use run configure files based on the build configuration. For example, you might want to get code coverage for the Debug build, while you don’t want to instrument the Release build.
The target CoreTestConfiguration in the team build runs for each build configuration. So, we can override target BeforeTestConfiguration to set properties used by TestToolsTask based on build configuration.
The following code demonstrate how to parse in test run configure file based on the build configureation: