Commit 3be98b4
fix: fall back to portable RID for bundled CLI lookup on Linux (#424)
On Linux distros that install .NET from distribution packages (Ubuntu,
Fedora, RHEL, etc.), RuntimeInformation.RuntimeIdentifier returns
distro-specific RIDs like ubuntu.24.04-x64 instead of the portable
linux-x64. The bundled CLI is placed under runtimes/linux-x64/native/,
so the lookup fails and throws.
Fix both the runtime lookup and build-time RID resolution:
- Client.cs: GetBundledCliPath now falls back to the portable RID
(e.g., linux-x64) when the distro-specific RID path doesn't exist.
- GitHub.Copilot.SDK.targets: Always use portable RIDs derived from
OS/architecture detection instead of the project's RuntimeIdentifier,
which may be distro-specific.
Fixes #424
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e40d57c commit 3be98b4
2 files changed
Lines changed: 47 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1003 | 1038 | | |
1004 | 1039 | | |
1005 | 1040 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
9 | 18 | | |
10 | 19 | | |
11 | 20 | | |
| |||
0 commit comments