Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base load contexts on weaver paths #1269

Merged
merged 2 commits into from
May 15, 2024

Conversation

ltrzesniewski
Copy link
Member

Currently, Fody creates an assembly load context per solution directory. A problem with that approach is that if two projects in the same solution try to load two different versions of the same weaver on a single build node, the second load will fail.

This PR changes this logic to create assembly load contexts based on the set of weaver assembly paths which will be used in a given project. Therefore, two projects which use two different versions of the same weaver will get two different load contexts since the weaver path won't be the same (and even if it were the same path, the WeaversHistory class already takes care of this case).

Note that I may be missing some context here (I don't know why the load contexts were cached by solution path or why they were cached in the first place).

Closes #1268

@tom-englert tom-englert merged commit c4a1446 into Fody:master May 15, 2024
7 of 10 checks passed
@ltrzesniewski ltrzesniewski deleted the change-load-contexts branch May 15, 2024 15:49
@ltrzesniewski
Copy link
Member Author

Just FYI, the 6.8.1 release notes did not include #1224 for some reason, I had to add them manually.

@ltrzesniewski ltrzesniewski added this to the 6.8.1 milestone May 15, 2024
@tom-englert
Copy link
Member

@ltrzesniewski oops, maybe this was hidden among the hundreds of dependabot PR links that I had to remove.

@ltrzesniewski
Copy link
Member Author

Yeah no worries, dependabot is a mess 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileLoadException: Assembly with same name is already loaded when multiple Fody-using projects are referenced
2 participants