File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UnitTest Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,16 @@ private async Task ExecuteTestsForInstance(
508
508
IDisposable consoleRegistration = default ;
509
509
CustomConsoleOutput testConsoleOutput = default ;
510
510
511
- if ( consoleOutput . IsChecked ?? false )
511
+ bool isConsoleOutput = false ;
512
+ bool isRunningIgnored = false ;
513
+
514
+ await Dispatcher . RunAsync ( CoreDispatcherPriority . Normal , ( ) =>
515
+ {
516
+ isConsoleOutput = consoleOutput . IsChecked ?? false ;
517
+ isRunningIgnored = runIgnored . IsChecked ?? false ;
518
+ } ) ;
519
+
520
+ if ( isConsoleOutput )
512
521
{
513
522
var previousOutput = Console . Out ;
514
523
@@ -521,7 +530,7 @@ private async Task ExecuteTestsForInstance(
521
530
522
531
try
523
532
{
524
- var shouldRunIgnored = runIgnored . IsChecked ?? false ;
533
+ var shouldRunIgnored = isRunningIgnored ;
525
534
526
535
foreach ( var testMethod in tests )
527
536
{
You can’t perform that action at this time.
0 commit comments