Reorganize assembly resolution; fix error loading WindowsBase.dll #1483
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #1466, which is caused by loading the wrong copy of
WindowsBase.dll
, the copy that's part ofMicrosoft.NetCore.App
rather than the one fromMicrosoft.WindowsDesktop.App
.In order to resolve it, I did a great deal of refactoring in
TestAssemblyResolver
. We were using four main strategies to locate assemblies in a fixed order. I've now changed the structure as follows:Microsoft.WindowsDesktop.App
directory first.I view this as a start. In the future, we may want to get self-diagnostic reporting of how often each strategy is used. We may want to subdivide the strategies further or add new ones. We'll almost certainly want to look at efficiency.
So I'd like to get comments on this PR about the usefulness of the new structure for those future purposes in addition to the normal review of the bug fix. I've asked @veleek to do the primary review as he has worked in this area but anyone on the @nunit team is welcome to review as well.