Since the compiler does the part of ignoring the source code, you cannot run tests that were ignored from the MSTest test runner. If you want to have conditionally executed tests, you have several options.
Create a new build configuration and set the compiler directive. Enable ignore if / only when directive is set (depending on your use)
Disable tests, but do not ignore them. Disabling means that the test can be started manually, ignoring that they cannot.
Create a new "ignored" category of tests and exclude this from your builds / other tests. Then just enable this category locally.
Hopefully one of these three will work for you. The view depends on what you have and the reasons why you ignore or do not ignore these tests.
source share