First of all, thanks for your awesome library.
I have encountered this issue, and it took me a few hours to figure out that it is SheepAspect enhanced dll that was causing me trouble. I hope you can have a look...
I was trying to intercept and log everything when a dll calls RestSharp.Execute<T>(RestRequest).
I have the SelectCallMethods as follow:
[SelectCallMethods( "Method:(Name:'Execute*'& InType:Name:'*RestClient') & FromMethod:(Public & InType:Name:'Api')" )]
After I compiled the Api class, the other project which referenced this dll throw:
I inspected the dll with ILSpy, it showed this exception when analyzing it:
A method contains RestClient.Execute<T>(RestResponse)
System.InvalidCastException: Unable to cast object of type 'Mono.Cecil.MethodReference' to type 'Mono.Cecil.GenericInstanceMethod'.
I tried to use the non-generic version, RestClient.Execute(RestRequest), then the weaved dll was fine...
Hope you can help. Thanks!