Skip to content

how to debug reflection error #1933

@MarshalOfficial

Description

@MarshalOfficial

Hi there, I got this error when running my benchmark console application:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NotSupportedException: Unknown Acknowledgment: cknowledgment
   at BenchmarkDotNet.Engines.ConsoleHost.SendSignal(HostSignal hostSignal)
   at BenchmarkDotNet.Engines.HostExtensions.BeforeMainRun(IHost host)
   at BenchmarkDotNet.Engines.Engine.Run()
   at BenchmarkDotNet.Autogenerated.Runnable_0.Run(IHost host, String benchmarkName) in D:\path\path\path\project-name\bin\Release\net5.0\905bb547-33f1-4501-898b-08ad67d64091\905bb547-33f1-4501-898b-08ad67d64091.notcs:line 169
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) in D:\path\path\path\project-name\bin\Release\net5.0\905bb547-33f1-4501-898b-08ad67d64091\905bb547-33f1-4501-898b-08ad67d64091.notcs:line 51

How can I detect the problem?
My code is:

public class GetAccountBalanceBenchmark
    {
        [Benchmark]
        public async Task RUN() 
        {
            var _ = await Core.Sdk.GetAccountBalance(new SDK.Models.GetAccountBalanceModel { Id = "10", IdType = Codec.IdType.ACCOUNT });            
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions