❔ 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?
8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Set the engine mode and configuration of ncrunch as well as solution build all to x64, to enforce it to be built in 64 bit, as well as x86 before. And also tried all combinations of x86 and x64 for the respective projects in the solution, each time they fail due to that.
I have to note:
The project, even back in .NET Framework 4.8, was forced to run only in x64.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Did that. 😛
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Still not working, nope.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.