I’m trying to use the MSBuild NUnit community task to force tests to run on each build, but I now see that when I use ReSharper’s test runner and it builds the project I’m running the tests twice. It works but is not really desirable.
Does anyone know of a variable or condition I can check within MSBuild so that I can skip the community task if I know the test runner is going to execute the tests anyway?
Note: I’m using VS2008 and the MSBuild script is integrated with the solution/project files. I want the best of all worlds. CTRL + SHIFT + B, plus command-line, plus CI server.
I asked this question on the Resharper community forums and although I didn’t get a direct yes or no to my question, I interpreted the answer to be no. If anyone wants to chime in with a confirmed yes or no, it would set my mind at ease.
I decided I could work around my problem by creating a solution configuration called
DebugResharperTestand I choose that config when I want to use the Resharper test runner. That configuration name variable will keep the build from kicking off the NUnit msbuild task.