We are using NCrunch 4.5.0.3
MS Fakes are no longer working with the latest VS 2019 Enterprise 16.8 RTM version, NCrunch shows the following error:
Test method YYY.Notifications.CommandHandler.Test.Messages.CommandValidatorBehaviour.Validate_Should_ThrowFaultException_When_ContextIsNull threw exception:
Microsoft.QualityTools.Testing.Fakes.Shims.ShimNotSupportedException: YYY.Notifications.Contract.Commands.SendNotificationCommand
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InvokeEvent[T](T value, Action`1 eh)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.OnAttachedUnsupportedMethod(MethodBase method)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.CheckInstrumentation(MethodBase method)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InternalAttachDetour(Object optionalReceiver, MethodBase method, Delegate detourDelegate)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.AttachDetour(Object optionalReceiver, MethodBase method, Delegate detourDelegate)
at Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.SetShimMethod(Delegate optionalStub, Object optionalReceiver, MethodBase method)
at Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.SetShim(Delegate optionalStub, Type receiverType, Object optionalReceiver, String name, ShimBinding flags, Type returnType, Type[] parameterTypes)
at Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.SetShimPublicInstance(Delegate optionalStub, Type receiverType, Object optionalReceiver, String name, Type returnType, Type[] parameterTypes)
at YYY.Notifications.Contract.Commands.Fakes.ShimSendNotificationCommand.set_ContextGet(Func`1 value)
at YYY.Notifications.CommandHandler.Test.Messages.CommandValidatorBehaviour.Validate_Should_ThrowFaultException_When_ContextIsNull() in C:\Dev\Vie\Notification\Src\NS\v\1.39\YYY.Notifications.CommandHandler.Tests\Messages\CommandValidatorBehaviour.cs:line 73
We are using SDK-based project file with .NET 4.7.2 (everyhing was working fine with a previous version of VS 2019 Enterprise Edition.
We are using MsTestV2.
The Visual Studio Test Runner is working fine.
We use this nuget package from MS to use fakes (should also be working with .net core projects):
https://www.nuget.org/pa...akes/16.7.4-beta.20330.2