<PackageReference Include="NUnit" Version="4.5.1" />

NUnit.Framework.Internal.SafeSynchronizationContext

This context is used to protect test execution from any exceptions
namespace NUnit.Framework.Internal { public class SafeSynchronizationContext : SynchronizationContext { protected void ExecuteSafely(SendOrPostCallback d, object state); public static SafeSynchronizationContext Create(SynchronizationContext synchronizationContext, TestExecutionContext executionContext); } }