Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.13.0
-
None
-
None
Description
I could build Thrift .NET Std quite easily with dotnet on MSVC and Linux. However when trying to use it in a .NET Framework project, I can not get past the following error:
src\gen-netstd\MyThriftAPI.cs(54,23): error CS0012: The type 'ValueTask<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [C:\data\Debug\WPFGui\WPFGui_w0ude4yv_wpftmp.csproj]
I've spent by now almost a full day to try different variations of workarounds. What I could find on the web was:
- Switch to a newer .NET Framework. But 4.7.2 did not help.
- Remove the reference to "System.Threading.Tasks.Extensions" from Thrift. This causes an alternative transitive reference to "System.Threading.Tasks.Extensions, Version=4.2.0.0" (last digit zero instead of one) instead, but does not help
- Build Thrift with netstandard2.1 instead of netstandard2.0. This causes further undefined references of netstandard2.0.
- Install "System.Threading.Tasks.Extensions" 4.5.3 from NuGet. This did not make any difference
I'm at the end of my wit here. Did other people experience this problem, and/or who can use Thrift for .NET Std in a WPF application? Any tips or tricks? Help would be greatly appreciated!