benaadams / Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)
Apache License 2.0
2.76k stars 118 forks source link

Add ValueTask support #86

Closed pengweiqhca closed 4 years ago

pengweiqhca commented 5 years ago

https://github.com/benaadams/Ben.Demystifier/blob/master/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs#L686

                else if (type == typeof(TaskAwaiter) ||
                    type == typeof(TaskAwaiter<>) ||
+                   type == typeof(ValueTaskAwaiter) ||
+                   type == typeof(ValueTaskAwaiter<>) ||
+                   type == typeof(ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter) ||
+                   type == typeof(ConfiguredValueTaskAwaitable<>.ConfiguredValueTaskAwaiter) ||
                    type == typeof(ConfiguredTaskAwaitable.ConfiguredTaskAwaiter) ||
                    type == typeof(ConfiguredTaskAwaitable<>.ConfiguredTaskAwaiter))
                {

https://github.com/benaadams/Ben.Demystifier/blob/master/src/Ben.Demystifier/Ben.Demystifier.csproj#L17

  <PropertyGroup>
-   <TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
+   <TargetFrameworks>netstandard2.1;netstandard2.0;net45</TargetFrameworks>
  </PropertyGroup>

  <ItemGroup>
+   <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" Condition="'$(TargetFramework)' != 'netstandard2.1'" />
  </ItemGroup>