FakeItEasy: MissingMethodException - Cannot create an instance of an interface when calling A.Fake when debugging
when I debug MSUnit test code I get
System.MissingMethodException occurred
Message=Cannot create an instance of an interface.
Source=mscorlib
StackTrace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
InnerException:
on the first A.Fake<ITest>()
call
ITest tt = A.Fake<ITest>();
It runs normally when I just run tests. so it happens only under visual studio debugger. what is is missing?
windows7/VS2010 ultimate/FakeItEasy 1.7.4626.65 Started recently… not sure what changed.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 51 (34 by maintainers)
Is this not a case of having “Break when an exception is thrown” checked?