Add assembly resolution for .NET runtime#573
Conversation
Also make sure that System.Runtime do not get redirected.
|
This change blocks my ability to port ConfuserEx to Linux/Mac so I would appreciate that somehow it will trigger faster release. |
The fix is from 0xd4d/dnlib#573
|
Hello, This is not a valid way to fix assembly resolution for .NET Core/Standard/.NET 5+ The current assembly resolver is built to follow assembly resolution logic and rules of .NET Framework only. Adding a search path to the current runtime directory does not fix the problem, nor does the redirect. These are just hack fixes. A proper solution is to determine the runtime of the file that the assembly reference originates from and use the appropriate logic. The assembly resolution logic for .NET Core and similar is very different, as it does not search the GAC at all and instead searches the path in the .NET installation directory for the appropriate .NET version. Resolving .NET Core 3.0 files to .NET 7 files, for example, is completely wrong. Things like the runtime WindowsDesktop vs. regular vs. AspNetCore need to be considered too. |
|
I don't brave enough to implement all that logic without having test for existing behavior, so I going for smallest fix. I do acknowledge that this is not full fix, but what's action plan. Implement everything at once? How work can be split and delivered in small increments? |
Also make sure that System.Runtime do not get redirected.