| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5276ac6 commit c71de92
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,22 @@ | |||
| 4 | 4 | from pathlib import Path | |
| 5 | 5 | from typing import Dict, Optional, Union, Any | |
| 6 | 6 | import clr_loader | |
| 7 | + from clr_loader.util.runtime_spec import DotnetCoreRuntimeSpec | ||
| 8 | + | ||
| 9 | + # Monkeypatch clr_loader to fix .NET 10 version parsing | ||
| 10 | + # TODO: Remove this once clr_loader is updated | ||
| 11 | + def _patched_tfm(self) -> str: | ||
| 12 | + parts = self.version.split(".") | ||
| 13 | + return f"net{parts[0]}.{parts[1]}" | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + def _patched_floor_version(self) -> str: | ||
| 17 | + parts = self.version.split(".") | ||
| 18 | + return f"{parts[0]}.{parts[1]}.0" | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + DotnetCoreRuntimeSpec.tfm = property(_patched_tfm) | ||
| 22 | + DotnetCoreRuntimeSpec.floor_version = property(_patched_floor_version) | ||
| 7 | 23 | ||
| 8 | 24 | __all__ = ["set_runtime", "set_runtime_from_env", "load", "unload", "get_runtime_info"] | |
| 9 | 25 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments