Every time I made a change in a test (MSTest) in Visual Studio 2010, a message box popped up:
Changes to your tests are no longer automatically displayed. Click Refresh to display your changes in the Test View or Test List Editor.
Yes, thanks. But - why? I've changed tests many times before, but that message was totally new to me.
Additionally, in Test View a new message showed up in the notification area:
Changes were made to the tests, click Refresh to update.
Every time I pressed the Refresh button, the solution was built but the list of tests in the Test View did not always refresh properly.
Moreover, the testrunner in my beloved ReSharper failed on running new unit tests:
That showed the direction to the problem: the new test was written, but the testrunner can't find it? Well, then the test did not make it from the code to the assembly. Looks as if the assembly has not been built properly.
The reasonLooking into the current configuration unveiled the reason: the test project was not configured to be included in the build for the current configuration. So, I could type as many tests I wanted, they never made it to the assembly to be actually run.
The solutionNow the solution was easy. I just had to configure the current configuration to also build the test project.
For that call the configuration manager: