Can not run benchmark after PR #32
leandromoh opened this issue Β· comments
When I try to run benchmark on main branch the following error occurs:
// Validating benchmarks:
Assembly NCsvPerf which defines benchmarks references non-optimized TxtCsvHelper
If you own this dependency, please, build it in RELEASE.
If you don't, you can disable this policy by using 'config.WithOptions(ConfigOptions.DisableOptimizationsValidator)'.
Probrably the lib added in #32 was built using DEBUG mode instead of RELEASE.
@camdrudge, take a look at this: https://garcia.in/posts/2021/pitfalls-of-unoptimized-nuget-packages/
the same happened to me in my first releases;
Well, it looks like I need a unit test for this π.
Looks like @camdrudge just need to use dotnet pack -c Release
to produce the .nupkg.
I have repackaged other libraries to workaround this but ideally you can compile the Release version since it will help your package consumers too. Free perf! π
Thanks Cameron! I added a test so we can catch this next time.