Commit 0d864f4
committed
Fix bug caused by
Unfortunately `System.Threading.Tasks` v4.7.1 is broken. Its package
manifest states that it depends on `System.Threading.Tasks.Extensions`
>= v4.5.4 (assembly version v4.2.0.1); however, for some reason it
actually requests v4.2.0.0. While neither OmniSharp nor PowerShell
Editor Services, the downstream library where this bug appeared, ship
that version of the library, it can sometimes be found in the Global
Assembly Cache on Windows. When present (due to an installation by some
other program), it gets loaded, and then other dependencies (correctly)
request v4.2.0.1 which also gets loaded. When both are loaded, a
`System.MissingMethodException` is thrown! Specifically the method
`ChannelReader.ReadAsync` (from `System.Threading.Tasks`) on the type
`Tasks.ValueTask` (provided by `System.Threading.Tasks.Extensions`) can
no longer be resolved. I do not know enough about the intricacies of
method/type resolution in the full .NET Framework as to explain
precisely why the presence of v4.2.0.0 causes this resolution to fail,
but it certainly does. Upgrading `System.Threading.Tasks` to v6.0.0 is
confirmed to solve the problem, since the newer package correctly
requests `System.Threading.Tasks.Extensions` v4.2.0.1.System.Threading.Tasks v4.7.11 parent ce5dadc commit 0d864f4
File tree
3 files changed
+2
-3
lines changed- .build
- sample/SampleServer
3 files changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments