You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException :
'JsonLD.Entities.Tests.ContextResolverTests.GenericType' does not contain a definition for 'Context'
Apparently the class has to be public and cannot be nested. Here's my repository stripped down. I removed everything, all unnecessary code and replaced paket with plain nuget references, to no avail.
In the second attachment all 4 tests pass only when all of them are executed together. And more precisely, when Nested_WithImpromptu runs before Nested_WithDynamitey.
Which means that calling ImpromptuInterface.InvokeExt.InvokeExt.WithStaticContext first is what changes the behaviour of Dynamitey.
One more observation. While trying to debug this I noticed that there already is a similar passing test: TestStaticPropertySetFollowedByGetTest. The differece is that it first sets the property. And indeed, calling setter first does "something" which fixes getting private properties later.
Even more interesting is that getting a public static property fails if it is first set because of this condition, saying cannot explicitly call operator or accessor.
I'm migrating an older projects to .NET Standard. Previously I used ImpromputInterface:
Where the
type
is for example a nested private class within a test fixture:Now I want to target netstandard1.5 so I replaced the original implementation with Dynamitey
And it stopped working!
Apparently the class has to be public and cannot be nested. Here's my repository stripped down. I removed everything, all unnecessary code and replaced paket with plain nuget references, to no avail.
does-not-work.zip
But the real kicker is that I tried to reproduce this from scratch and was completely unable to get the same effect. What is going on?
works.zip
The text was updated successfully, but these errors were encountered: