Skip to content
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

BenchmarkDontNet should make allowance for projects where Preview Features are enabled #1872

Closed
bradykelly opened this issue Dec 19, 2021 · 1 comment
Milestone

Comments

@bradykelly
Copy link

I have a .NET 6 project with Preview Features enabled, i.e. my project file contains the <EnablePreviewFeatures>True</EnablePreviewFeatures> property. I have this to use the new C#10 static abstracts feature.

When I try and run benchmarks on my project, BDN tries to build a project for benchmarking and gets a build error for just about everything in my project, and that build error is:

error CA2252: Using 'Part1' requires opting into preview features

It would be great if BDN could observe this build property in source projects and include it in the build command for the projects that it generates.

@adamsitnik
Copy link
Member

adamsitnik commented Dec 20, 2021

Hi @bradykelly

Edit: I've edited this post, see history for full details

It was already fixed in #1842 but not released to nuget.org yet.

To use it today you need to download the latest BDN preview version from our CI NuGet feed:

<packageSources>
  <add key="bdn-ci" value="https://ci.appveyor.com/nuget/benchmarkdotnet" />
</packageSources>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants