Tests for exceptions are created using [InternalMock](https://github.com/hassanhabib/InternalMock). It's constructed using: >service.Mock(methodName).Throws(exception) The InternalMock implementation depends on [Harmony](https://github.com/pardeike/Harmony) to patch private methods. This patching fails in some situations: - running tests in test explorer ('Run') fails - running tests using 'dotnet test -c Debug' fails - running tests using 'dotnet test -c Release' fails but, running tests in test explorer ('Debug') **succeeds** The cause seems to be originated in [MonoMod.Common](https://github.com/pardeike/Harmony) as mentioned in [Harmony issue 504](https://github.com/pardeike/Harmony/issues/504) Waiting for .NET 7 support might not be the way forward https://github.com/pardeike/Harmony/issues/504#issuecomment-1320613517