You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My first time using it, I built it, ran it, and there was nothing. No output at all.
I figured out that my template generated "class Program" and that by changing that to "public class Program" it was able to "see" the Benchmark attributes and run normally. But it would have been helpful to have some kind of message rather than zero output which was a bit confusing and off-putting for a first impression.
BenchmarkRunner.Run<Program>();//Gives://Program containing Benchmark method MySuperBenchmarkMethod has incorrect access modifiers.//Declaring type must be public.
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);//Gives://No benchmarks to choose from. Make sure you provided public non-sealed non-static types with public [Benchmark] methods.
Activity
YegorStepanov commentedon Jan 29, 2022
@dpuza-formativ Сan you share the code?
I tried reproduce it, but:
dpuza-formativ commentedon Jan 31, 2022
@YegorStepanov
https://gist.github.com/dpuza-formativ/bf58387f438ab10c523ad905b7ac0976
emanuel-v-r commentedon Oct 13, 2022
Is this still an issue? If it is, can I grab it?
YegorStepanov commentedon Oct 13, 2022
@emanuel-v-r the PR exists, and I think everything is fine with it
filzrev commentedon Aug 14, 2026
This issue seems be resolved by PR #2718.