[v5.10.0.7]
I bumped into a test project that is using
Xunit.DependencyInjection which is quite impossible to run with NCrunch.
I tried creating a separate project with just below content, and the test fails if NCrunch runs it in an existing test runner process (but succeeds when running in a new process).
Code:
//XUnit 2.9.2
//xunit.runner.visualstudio 2.8.2
//Xunit.DependencyInjection 9.5.0
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
//services.AddTransient<IDependency, DependencyClass>();
}
}
public class DummyTest
{
[Fact]
public void DoSomething()
{
/* test error when running in existing test runner process:
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.CancellationToken.ThrowIfCancellationRequested()
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Xunit.DependencyInjection.DependencyInjectionTestFrameworkExecutor.RunTestCases(IEnumerable`1 testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions) in S:\GitHub\Xunit.DependencyInjection\src\Xunit.DependencyInjection\DependencyInjectionTestFrameworkExecutor.cs:line 51
*/
}
}
Is this a known issue and/or workaround for this behavior?
Thanks.