File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,9 @@ def load_hostfxr(dotnet_root: Path):
1818 hostfxr_name = _get_dll_name ("hostfxr" )
1919 dotnet_root = dotnet_root .absolute ()
2020
21- # This will fail as soon as .NET hits version 10, but hopefully by then
22- # we'll have a more robust way of finding the libhostfxr
21+ # Find all hostfxr versions by looking for the library file in version subdirectories
2322 hostfxr_path = dotnet_root / "host" / "fxr"
24- hostfxr_paths = hostfxr_path .glob (f"?. */{ hostfxr_name } " )
23+ hostfxr_paths = hostfxr_path .glob (f"*/{ hostfxr_name } " )
2524
2625 error_report = list ()
2726
@@ -69,7 +68,9 @@ def load_netfx():
6968def _path_to_version (path : Path ) -> Tuple [int , int , int ]:
7069 name = path .parent .name
7170 try :
72- res = list (map (int , name .split ("." )))
71+ # Handle pre-release versions like "10.0.0-rc.1" by taking only the version part
72+ version_part = name .split ("-" )[0 ]
73+ res = list (map (int , version_part .split ("." )))
7374 return tuple (res + [0 , 0 , 0 ])[:3 ]
7475 except Exception :
7576 return (0 , 0 , 0 )
You can’t perform that action at this time.
0 commit comments