Post

I guess every kind of library author should check out PolySharp. I definitely will.

Lars Hanisch@flensrocker.de

Just had a surprising MethodMissingException in tests without changing something (as far as I know, but 🤷). Found this post by @steplyakov.bsky.social which helped me understanding the issue. I haven't solved it yet in my code, but I will... Thanks! sergeyteplyakov.github.io/Blog/csharp/...

Either PolySharp or Polyfill. Sadly my codebase has issues with them and I had no time yet to investigate.

0 reposts0 likes

Thank you, Simon! You helped enough providing the package. I don't know the issue right now, but it is related to some third party library, I integrated by source, which brings their own kind of polyfill. And that interferes somehow. But the main issue is just allocating time.

I think I managed my problems. I have PdfSharp in my sourcetree and it adds some selfmade polyfills. After removing them and "InternalsVisibleTo" (and just making some classes public) the only thing left was "GetSubArray", which I worked around with ".AsSpan()[1..2].ToArray()" which should be ok.

Of course more tests are needed. And I had to exclude Polyfill from some Xamarin projects (migrating to MAUI is ongoing). But it looks better than the first time I tried!

I can't recall right now. I hope to find some time again in the next weeks. Teaching an old (>25 years) codebase new tricks is sometimes challenging. 😎 I fixed my MissingMethodExc. problem by correcting binding redirects. It's fun working "crossplatform" with 4.8 and 8. 🤪