File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,20 @@ def load_hostfxr(dotnet_root: Path):
2323 hostfxr_path = dotnet_root / "host" / "fxr"
2424 hostfxr_paths = hostfxr_path .glob (f"?.*/{ hostfxr_name } " )
2525
26+ error_report = list ()
27+
2628 for hostfxr_path in reversed (sorted (hostfxr_paths , key = _path_to_version )):
2729 try :
2830 return ffi .dlopen (str (hostfxr_path ))
29- except Exception :
30- pass
31+ except Exception as err :
32+ error_report . append ( f"Path { hostfxr_path } gave the following error: \n { err } " )
3133
3234 try :
3335 return ffi .dlopen (str (dotnet_root / hostfxr_name ))
34- except Exception :
35- pass
36+ except Exception as err :
37+ error_report . append ( f"Path { hostfxr_path } gave the following error: \n { err } " )
3638
37- raise RuntimeError (f"Could not find a suitable hostfxr library in { dotnet_root } " )
39+ raise RuntimeError (f"Could not find a suitable hostfxr library in { dotnet_root } . The following paths were scanned: \n \n " + ( " \n \n " . join ( error_report )) )
3840
3941
4042def load_mono (path : Optional [Path ] = None ):
You can’t perform that action at this time.
0 commit comments