diff --git a/Library/Serein.Library.csproj b/Library/Serein.Library.csproj index 3c06abf..3e4a1f0 100644 --- a/Library/Serein.Library.csproj +++ b/Library/Serein.Library.csproj @@ -16,7 +16,7 @@ no - true + False true true @@ -90,7 +90,7 @@ - + diff --git a/Library/Utils/EmitHelper.cs b/Library/Utils/EmitHelper.cs index 6510ede..0177062 100644 --- a/Library/Utils/EmitHelper.cs +++ b/Library/Utils/EmitHelper.cs @@ -206,7 +206,7 @@ namespace Serein.Library.Utils il.Emit(isStatic ? OpCodes.Call : OpCodes.Callvirt, methodInfo); // 如果是泛型Task - if (isTaskGeneric && taskResultType is not null) + if (isTaskGeneric && methodInfo.ReturnType.IsValueType && taskResultType is not null) { var convertMethod = typeof(EmitHelper) .GetMethod(nameof(ConvertTaskResult),