Open AlexVallat opened 2 years ago
Seconded. Downgrade to NSubstitute 4.2.2 (as stated in nuspec) resolved the problem.
This is caused by https://github.com/nsubstitute/NSubstitute/issues/685
Could be fixed by them, or here by changing https://github.com/MRCollective/AutofacContrib.NSubstitute/blob/9e7498b25beb0b917a6dfd2a735c4cbe72d10b72/AutofacContrib.NSubstitute/NSubstituteRegistrationHandler.cs#L79
to pass Array.Empty<object>()
instead of null
As https://github.com/nsubstitute/NSubstitute/issues/685 has been fixed, I assume this could be closed.
It looks like the 4.3.0 release of NSubstitute is not compatible. For a minimal repro:
This works fine with NSubstitute 4.2.2 but with 4.3.0 throws an exception: