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):
23
23
hostfxr_path = dotnet_root / "host" / "fxr"
24
24
hostfxr_paths = hostfxr_path .glob (f"?.*/{ hostfxr_name } " )
25
25
26
+ error_report = list ()
27
+
26
28
for hostfxr_path in reversed (sorted (hostfxr_paths , key = _path_to_version )):
27
29
try :
28
30
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 } " )
31
33
32
34
try :
33
35
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 } " )
36
38
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 )) )
38
40
39
41
40
42
def load_mono (path : Optional [Path ] = None ):
You can’t perform that action at this time.
0 commit comments