-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Console Tool throws System.Reflection.ReflectionTypeLoadException #1460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same issue with dotnet 3.1. Installed with
I'm using documented sample to create dot net project as described here
|
Hi! I was never a fan of adding the My suggestion is to stop using it and just create a console app, install BDN and use using System;
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace MyBenchmarks
{
public class Md5VsSha256
{
private const int N = 10000;
private readonly byte[] data;
private readonly SHA256 sha256 = SHA256.Create();
private readonly MD5 md5 = MD5.Create();
public Md5VsSha256()
{
data = new byte[N];
new Random(42).NextBytes(data);
}
[Benchmark]
public byte[] Sha256() => sha256.ComputeHash(data);
[Benchmark]
public byte[] Md5() => md5.ComputeHash(data);
}
public class Program
{
public static void Main(string[] args)
{
var summary = BenchmarkRunner.Run(typeof(Program).Assembly);
}
}
} dotnet run -c Release |
@CodeTherapist Maybe you have time to check it? I think you made the first version of the global tool? @adamsitnik I agree with you that global tool has no added value and does not make work easier. But I believe this problem can be fixed. But to be honest, I'm not going to spend any private time on it, I can prepare PR to remove this tool 😄 |
For thoose that arrive here randomly, as documented here. You can achieve the same through cli doing: using BenchmarkDotNet.Running;
namespace Your.Namespace.Benchmarks
{
public class Program
{
static void Main(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
}
}
Seems like the |
Are there any plans to remove the page from the documentation? |
So when I am trying to run the following command in the console:
it throws the following error at me:
with the following StackTrace:
C# version: 8
.Net version: .Net Preview 5 preview 3
Console Tool version: 0.12.1
The text was updated successfully, but these errors were encountered: