Closed sdao closed 2 years ago
Oh crap, I realized this should have probably gone to the clr-loader repo. But I'm not sure if I can move it myself.
Could you check whether the newest fixes this for you? I'll have a look later whether I can just port https://github.com/dotnet/runtime/blob/20e5237104ddd178f12bc501352e45a5e91e5048/src/native/corehost/fxr_resolver.cpp#L12 to Python to get the exact behaviour that the nethost
library applies, but this should probably already do.
Yep, I can confirm that it picks up the expected version of hostfxr (e.g. 6.0.10 over 6.0.9) now. Thank you!
Fixed in v0.2.4, thank you for the detailed report :)
Environment
Details
Depending on the contents of
C:\Program Files\dotnet\host\fxr
(or wherever the dotnet root is), clr_loader might pick up an older version of hostfxr based on the logic indef load_hostfxr(dotnet_root: Path)
e.g. if the contents of the folder are
then it doesn't pick up 5.0.17, but picks up 5.0.5 because Python's lexicographic sort will order the folder as
['2.1.7', '3.1.26', '5.0.17', '5.0.5']
.This is admittedly very minor, but we just ran into this and wanted to give a heads up :) Thank you!