Tests for exceptions are created using InternalMock. It's constructed using:
service.Mock(methodName).Throws(exception)
The InternalMock implementation depends on 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 as mentioned in Harmony issue 504
Waiting for .NET 7 support might not be the way forward pardeike/Harmony#504 (comment)
Tests for exceptions are created using InternalMock. It's constructed using:
The InternalMock implementation depends on Harmony to patch private methods.
This patching fails in some situations:
but, running tests in test explorer ('Debug') succeeds
The cause seems to be originated in MonoMod.Common as mentioned in Harmony issue 504
Waiting for .NET 7 support might not be the way forward pardeike/Harmony#504 (comment)