AnyDiff icon indicating copy to clipboard operation
AnyDiff copied to clipboard

System.Reflection.TargetParameterCountException

Open sekulicb opened this issue 4 years ago • 4 comments

Hi. Out of the blue, now I get exception: System.Reflection.TargetParameterCountException with message: Parameter count mismatch. The library was working fine for couple of months, but now these are thrown when comparing custom types, and collections of custom types. Nothing changed when it comes to the part that is comparing objects. I don't understand what could cause this.

output window:

Exception thrown: 'System.Reflection.TargetParameterCountException' in System.Private.CoreLib.dll Exception thrown: 'System.Reflection.TargetParameterCountException' in TypeSupport.dll

sekulicb avatar Apr 07 '20 08:04 sekulicb

Looks like the problem was in "Just my code" option in Visual Studio. I don't remember why I enabled it, but again why does the library throws so many exceptions ?

sekulicb avatar Apr 07 '20 14:04 sekulicb

that's a really good question, I'll take a look and see if I can reproduce this

replaysMike avatar Apr 21 '20 23:04 replaysMike

if you are using .Net Core 3, it's possible this is due to changes in that particular runtime. The last AnyDiff update included some changes to address breaking changes the .net core team introduced. There are differences with IEnumerable<> as well as supporting libraries such as TypeSupport which is required by AnyDiff.

replaysMike avatar Apr 22 '20 00:04 replaysMike

I'm using .Net Core 3.1 and I get those Exceptions as well, which really slow down the Diff.

andyesys avatar Jul 30 '20 13:07 andyesys