I want to setup the TFS to build both Debug and Release versions of my solutions but only run the unit tests when in Debug mode. I’ve tried disabling the builds for the test projects in my solutions’ Configuration Properties, but to no avail. And what’s annoying is that the tests will always fail in Release mode because it can’t seem to find the files even though they exist…
So anyone know how to get TFS to run the unit tests only in Debug mode (but still build both Debug and Release modes)?
I’ve finally found out how to do it. In the TFS build definition file (.proj), under the section for listing out the test list/DLLs, just add a $(Configuration) condition to each item as follows:-