ManagedLoadContext: Search In Additional Probing Paths (Fixes #162) #172
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.
Not really sure what to say here.
This is an extremely minor simple fix for issue #162; that has been manually tested and sitting on my fork for a while.
I in particular remember using this in order to load the (Windows) desktop runtime inside a plugin; from a regular cross-platform console app compiled without the
UseWindowsForms
/UseWpf
MSBuild Project properties. (Normally this would fail because default ALC wouldn't probe for desktop runtime as theruntimeconfig.json
file wouldn't reference it.)Of course in practice you probably shouldn't need to do this; it was just a tiny experiment of mine which was how I found the original bug in the first place IIRC.
I might add a unit test for this if I feel motivated; I think the easiest thing would be to have MSBuild copy a dependency (assembly) to a subdirectory then add a probing path to that directory inside the test; that would be one way to do it at least.