wellen.
❔ Bad IL Format Exception when porting .NET Framework 4.8 Project to .NET Core 6.0
Hi, I've currently got the glorious task to port a .NET Framework 4.8 project to .NET Core 6.0. So far so good. No exceptions anywhere anymore, most of the warnings are gone. Majority of Unit Tests are running through.
Except for those 28 Unit Tests that toss me a "Bad IL Format" exception. I've tried building and running the Unit Tests isolated in x86, x64, and a mix of both, as well as AnyCPU. Each of these Unit Tests fail at the same point, and for the same reason. Debugging the code step by step does not give me a lot of information either, hence why I'll refrain from posting any code here for now.
I've also tried running the Tests in different test engines, all of them toss the same issue. These Unit Tests don't fail with .NET Framework 4.8, so it is definitely some issue caused by migrating to .NET Core 6.0. I've been through a ship load of google results, and none helped me so far.
Has anyone of you ever encountered this issue, and resolved it?
20 replies