Reputation: 7303
I want to get rid of the dialog saying
There were build errors. Would you like to continue and run tests from the last successful build
when I am running unit tests (I use test -> run -> all tests
).
How do I do that? I already know how to disable it when running a normal project.
I also want to know how this can ever be a useful feature?
Upvotes: 19
Views: 1148
Reputation: 1867
For Visual Studio 2017 / MSTestV2 you can do:
Tools > Options > Project and Solutions > Build and Run
"On Run, when build or deployment errors occur:" "Do not launch"
Upvotes: 1
Reputation: 2427
How do I do that?
You can't.
I also want to know how this can ever be a useful feature?
I find it useful when I am working closely with someone who is configuring test data. I can re-run tests to ensure new test data is valid, without having to worry about compiling any changes that I have done in the meantime.
For example if someone has changed some data in a database, I want to be able to run my tests to ensure that this new data is valid, and I want to be able to run the tests whether the current state of my code compiles or not.
Upvotes: 2