Skip to content

Add assembly resolution for .NET runtime#573

Open
kant2002 wants to merge 1 commit into0xd4d:masterfrom
kant2002:kant/add-assembly-resolution
Open

Add assembly resolution for .NET runtime#573
kant2002 wants to merge 1 commit into0xd4d:masterfrom
kant2002:kant/add-assembly-resolution

Conversation

@kant2002
Copy link

Also make sure that System.Runtime do not get redirected.

Also make sure that System.Runtime do not get redirected.
@kant2002
Copy link
Author

This change blocks my ability to port ConfuserEx to Linux/Mac so I would appreciate that somehow it will trigger faster release.

kant2002 added a commit to kant2002/ConfuserEx that referenced this pull request Mar 19, 2026
kant2002 added a commit to kant2002/ConfuserEx that referenced this pull request Mar 19, 2026
@ElektroKill
Copy link
Contributor

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.

@kant2002
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants