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

ManagedLoadContext: Search In Additional Probing Paths (Fixes #162) #172

Merged
merged 4 commits into from
Jan 31, 2021

Conversation

Sewer56
Copy link
Contributor

@Sewer56 Sewer56 commented Dec 28, 2020

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 the runtimeconfig.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.

@natemcmaster
Copy link
Owner

natemcmaster commented Jan 30, 2021

LGTM! I'm just going to rebase this against the main branch and then merge.

@natemcmaster natemcmaster added this to the 1.4.0 milestone Jan 31, 2021
@natemcmaster natemcmaster linked an issue Jan 31, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 31, 2021

Codecov Report

Merging #172 (3b7497d) into main (c6736c9) will increase coverage by 0.01%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
+ Coverage   81.85%   81.86%   +0.01%     
==========================================
  Files          15       15              
  Lines         540      546       +6     
==========================================
+ Hits          442      447       +5     
- Misses         98       99       +1     
Impacted Files Coverage Δ
src/Plugins/Loader/ManagedLoadContext.cs 77.93% <78.57%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6736c9...3b7497d. Read the comment docs.

@natemcmaster natemcmaster merged commit 5cd23e7 into natemcmaster:main Jan 31, 2021
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.

[Bug] ManagedLoadContext: Additional probing paths are ignored.
2 participants