The latest versions of .NET Core don't allow us to support forced stop and the methods to invoke it are being completely removed from the framework. Only cooperative stop will be supported in the future.
This affects V3 and V4 of the console runner and engine differently.
Version 4
We'll remove Stop(bool force) entirely from the API. This is a breaking change but much of what it breaks was already non-functional.
The Stop() method without any argument will remain and will invoke a cooperative stop. This implies that tests targeting .NET Core will need to support the cancellation token in order for a stop to work at all.
The forced stop will be replaced in V4 by a Kill() method, which will actually kill the process.
Version 3
The question of whether we need to do something in the version3 code is an open one. Options seem to be
- Do nothing... some version 3 users may need to wait for version 4.
- Make the same change in version 3, which may require some users to upgrade to the latest framework version.
- Attempt to deal with both situations in V3 by adding separate method overloads, with and without the
force parameter.
@nunit/engine-team @nunit/framework-team Your thoughts?
The latest versions of .NET Core don't allow us to support forced stop and the methods to invoke it are being completely removed from the framework. Only cooperative stop will be supported in the future.
This affects V3 and V4 of the console runner and engine differently.
Version 4
We'll remove
Stop(bool force)entirely from the API. This is a breaking change but much of what it breaks was already non-functional.The
Stop()method without any argument will remain and will invoke a cooperative stop. This implies that tests targeting .NET Core will need to support the cancellation token in order for a stop to work at all.The forced stop will be replaced in V4 by a
Kill()method, which will actually kill the process.Version 3
The question of whether we need to do something in the version3 code is an open one. Options seem to be
forceparameter.@nunit/engine-team @nunit/framework-team Your thoughts?