Comments (6)
Hey @johnkoerner. Thanks for reporting these issues. Most of these problems is as a result of incorrect MSIL generated during the rewriting of a method. I'm currently working on an under the hood re-implementation of Pose that replaces IL generation with Expression Trees which should fix most of the issues with Pose as well as open up more features like breakpoint support etc.
This re-implementation should be rolling out in about a week or two, but in the meantime I'll take a look at fixing this issue.
from pose.
@tonerdo we, as a community, are looking forward to see the new implementation! If you need any help, feel free to ask.
from pose.
Thanks for the update @tonerdo . When you feel it is ready, let me know and I can pull a branch and build it to test it out.
from pose.
This may be related to #11 as the stack traces are similar.
from pose.
Any update on the new implementation? I am getting this same exception when trying to use Pose in conjunction with Moq.
from pose.
I believe I'm experiencing this exception too. For me, changing the last line of GetRuntimeMethodForVirtual
, in StubHelper.cs, to
return type.GetMethod(methodInfo.Name, bindingFlags, null, types, null) ??
type.GetMethod($"{methodInfo.DeclaringType.FullName}.{methodInfo.Name}", BindingFlags.Instance | BindingFlags.NonPublic, null, types, null);
did the trick.
My analysis is that, without this change, GetRuntimeMethodForVirtual
does not know how to handle explicit interface implementations.
VB.NET's Implements keyword may cause similar problems; I've never checked out what they look like under the hood.
from pose.
Related Issues (20)
- how to shim a constructor with parameters?
- Offer to make public Shim constructor HOT 1
- Pose not compatible with Code Coverage tools?
- Can we use Pose with Moq?
- Common Language Runtime detected an invalid program. HOT 1
- Async-await HOT 3
- Reviving this project HOT 16
- Question : Make my function throw an exception
- shim for DateTime.UtcNow not working HOT 5
- Issue with DateTime.Now HOT 1
- Bug with a test app
- Issue with .Net static methods like File.Exists
- .NET 6.0 HOT 1
- Static methods doesen't work HOT 3
- ShimHelper.ValidateReplacementMethodSignature has ambiguous and vague output that does not help with debugging
- Stack Overflow when trying to use shim from task HOT 1
- Is this library Dead? HOT 1
- Mono Dependencies out of date.
- Issue with NET7 HOT 2
- :star: ANNOUNCEMENT: VERSION 2.0 RELEASED TO NUGET :star: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pose.