-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Generated benchmarks ignore --framework flag when running out of process #2371
Comments
It seems that we should do that, and actually pass the |
that would greatly help us |
I don't remember why exactly, but we have avoided that in the past (I know it sounds silly, but this code is now very old ;) ). We should rather get BenchmarkDotNet/src/BenchmarkDotNet/Templates/CsProj.txt Lines 4 to 5 in fd2639f
|
Yes I noticed these configurations but in my case they are not helping, |
Well, if we're going to be copying the entire original xproj in #1403, we will need to handle that case anyway. And hopefully that will also allow us to remove hacks like |
The ImportDirectoryBuildProps is being ignored.. :\ How do I fix that? |
@ViktorHofer @eerhardt @ericstj BDN generates a BenchmarkDotNet/src/BenchmarkDotNet/Templates/CsProj.txt Lines 1 to 6 in fc7afed
|
I could not make those properties affect the build - it would always look at my .props file What I ended up doing is have an empty Directory.Build.props file in my benchmark project (under a folder), and I copy it to the output folder. This seems to solve the issue. |
@ShaharPrishMSFT thanks for sharing the workaround! |
We usually do this the following way: https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Arcade.Sdk/tools/Directory.Build.props So, just create a Directory.Build.props file next to the project file with that content. Setting |
hello
I am hitting an error where when I run our benchmarks out of process with target net7.0 (like this: dotnet run -c release --framework net7.0 -r win-x64),
Bechnmarkdotnet generates a csproj named "BenchmarkDotNet.Autogenerated" that contains the following configuration:
net7.0
but because this project is part of a solution where Directory.Build.Props is used with configuration:
netstandard2.0;net7.0
the configuration TargetFrameworks takes precedence over TargetFramework and i get error:
error NU1201: Project is not compatible with netstandard2.0.
is there a way to configure benchmarkdotnet to put TargetFrameworks in the generated project instead of TargetFramework?
or any other way to get around this problem
thank you for your help
The text was updated successfully, but these errors were encountered: