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
If you run your benchmarks without specifying any custom settings, BenchmarkDotNet is going to run the benchmarks **using the same framework as the host process**:
25
25
26
26
```cmd
27
-
dotnet run -c Release -f netcoreapp3.1 # is going to run the benchmarks using .NET Core 3.1
28
-
dotnet run -c Release -f net8.0 # is going to run the benchmarks using .NET 8.0
27
+
dotnet run -c Release -f netcoreapp2.1 # is going to run the benchmarks using .NET Core 2.1
28
+
dotnet run -c Release -f netcoreapp3.0 # is going to run the benchmarks using .NET Core 3.0
29
29
dotnet run -c Release -f net48 # is going to run the benchmarks using .NET 4.8
30
30
mono $pathToExe # is going to run the benchmarks using Mono from your PATH
31
31
```
32
32
33
33
To run the benchmarks for multiple runtimes with a single command, you need to specify the target framework moniker names via `--runtimes|-r` console argument:
34
34
35
35
```cmd
36
-
dotnet run -c Release -f net8.0 --runtimes net8.0 netcoreapp3.1 # is going to run the benchmarks using .NET 8.0 and .NET Core 3.1
37
-
dotnet run -c Release -f net8.0 --runtimes net8.0 net48 # is going to run the benchmarks using .NET 8.0 and .NET 4.8
36
+
dotnet run -c Release -f netcoreapp2.1 --runtimes netcoreapp2.1 netcoreapp3.0 # is going to run the benchmarks using .NET Core 2.1 and .NET Core 3.0
37
+
dotnet run -c Release -f netcoreapp2.1 --runtimes netcoreapp2.1 net48 # is going to run the benchmarks using .NET Core 2.1 and .NET 4.8
38
38
```
39
39
40
40
What is going to happen if you provide multiple Full .NET Framework monikers? Let's say:
Copy file name to clipboardExpand all lines: docs/articles/faq.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,17 +13,17 @@ See also: [BenchmarkDotNet#237](https://github.com/dotnet/BenchmarkDotNet/issues
13
13
14
14
***Q** Why can't I install BenchmarkDotNet in a new .NET Core Console App in Visual Studio 2017?
15
15
16
-
**A** BenchmarkDotNet supports only netcoreapp3.1+.
16
+
**A** BenchmarkDotNet supports only netcoreapp2.0+.
17
17
Some old Visual Studio 2017 can create a new application which targets netcoreapp1.0.
18
-
You should upgrade it up to 3.1.
18
+
You should upgrade it up to 2.0.
19
19
If you want to target netcoreapp1.0 in your main assembly, it's recommended to create a separated project for benchmarks.
20
20
21
21
***Q** I created a new .NET Core Console App in Visual Studio 2017. Now I want to run my code on CoreCLR, full .NET Framework, and Mono. How can I do it?
22
22
23
23
**A** Use the following lines in your `.csproj` file:
@@ -33,7 +33,7 @@ If you want to target netcoreapp1.0 in your main assembly, it's recommended to c
33
33
[CoreJob, ClrJob, MonoJob]
34
34
```
35
35
36
-
* **Q** My source code targets old versions of .NET Framework or .NET Core, but BenchmarkDotNet requires `net461` and `netcoreapp3.1`. How can I run benchmarks in this case?
36
+
* **Q** My source code targets old versions of .NET Framework or .NET Core, but BenchmarkDotNet requires `net461` and `netcoreapp2.0`. How can I run benchmarks in this case?
37
37
38
38
**A** It's a good practice to introduce an additional console application (e.g. `MyAwesomeLibrary.Benchmarks`) which will depend on your code and BenchmarkDotNet.
39
39
Due to the fact that users usually run benchmarks in a develop environment and don't distribute benchmarks for users, it shouldn't be a problem.
Copy file name to clipboardExpand all lines: docs/articles/guides/console-args.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,29 +117,29 @@ You can also filter the benchmarks by categories:
117
117
The `--runtimes` or just `-r` allows you to run the benchmarks for selected Runtimes. Available options are:
118
118
119
119
* Clr - BDN will either use Roslyn (if you run it as .NET app) or latest installed .NET SDK to build the benchmarks (if you run it as .NET Core app).
120
-
* Core - if you run it as .NET Core app, BDN will use the same target framework moniker, if you run it as .NET app it's going to use net8.0.
120
+
* Core - if you run it as .NET Core app, BDN will use the same target framework moniker, if you run it as .NET app it's going to use netcoreapp2.1.
121
121
* Mono - it's going to use the Mono from `$Path`, you can override it with `--monoPath`.
122
122
* net46, net461, net462, net47, net471, net472, net48, net481 - to build and run benchmarks against specific .NET Framework version.
123
-
* netcoreapp3.1, net5.0, net6.0, net7.0, net8.0 - to build and run benchmarks against specific .NET (Core) version.
123
+
*netcoreapp2.0, netcoreapp2.1, netcoreapp2.2, netcoreapp3.0, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0 - to build and run benchmarks against specific .NET (Core) version.
124
124
* nativeaot5.0, nativeaot6.0, nativeaot7.0, nativeaot8.0 - to build and run benchmarks using NativeAOT. Can be customized with additional options: `--ilcPackages`, `--ilCompilerVersion`.
125
125
* mono6.0, mono7.0, mono8.0 - to build and run benchmarks with .Net 6+ using MonoVM.
126
126
127
-
Example: run the benchmarks for .NET 4.7.2 and .NET 8.0:
127
+
Example: run the benchmarks for .NET 4.7.2 and .NET Core 2.1:
128
128
129
129
```log
130
-
dotnet run -c Release -- --runtimes net472 net8.0
130
+
dotnet run -c Release -- --runtimes net472 netcoreapp2.1
131
131
```
132
132
133
-
Example: run the benchmarks for .NET Core 3.1 and latest .NET SDK installed on your PC:
133
+
Example: run the benchmarks for .NET Core 3.0 and latest .NET SDK installed on your PC:
134
134
135
135
```log
136
-
dotnet run -c Release -f netcoreapp3.1 -- --runtimes clr core
136
+
dotnet run -c Release -f netcoreapp3.0 -- --runtimes clr core
137
137
```
138
138
139
-
But same command executed with `-f net6.0` is going to run the benchmarks for .NET 6.0:
139
+
But same command executed with `-f netcoreapp2.0` is going to run the benchmarks for .NET Core 2.0:
140
140
141
141
```log
142
-
dotnet run -c Release -f net6.0 -- --runtimes clr core
142
+
dotnet run -c Release -f netcoreapp2.0 -- --runtimes clr core
143
143
```
144
144
145
145
## Number of invocations and iterations
@@ -208,10 +208,10 @@ To perform a Mann–Whitney U Test and display the results in a dedicated column
208
208
209
209
*`--statisticalTest`- Threshold for Mann–Whitney U Test. Examples: 5%, 10ms, 100ns, 1s
210
210
211
-
Example: run Mann–Whitney U test with relative ratio of 5% for all benchmarks for .NET 6.0 (base) vs .NET 8.0 (diff). .NET 6.0 will be baseline because it was first.
211
+
Example: run Mann–Whitney U test with relative ratio of 5% for all benchmarks for .NET Core 2.0 (base) vs .NET Core 2.1 (diff). .NET Core 2.0 will be baseline because it was first.
@@ -20,10 +20,10 @@ How do you know that BenchmarkDotNet has failed to build the project? BDN is goi
20
20
// Build Error: Standard output:
21
21
22
22
Standard error:
23
-
C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\net8.0\c6045772-d3c7-4dbe-ab37-4aca6dcb6ec4\BenchmarkDotNet.Autogenerated.csproj(36,1): error MSB4025: The project file could not be loaded. Unexpected end of file while parsing Comment has occurred. Line 36, position 1.
23
+
C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\netcoreapp2.1\c6045772-d3c7-4dbe-ab37-4aca6dcb6ec4\BenchmarkDotNet.Autogenerated.csproj(36,1): error MSB4025: The project file could not be loaded. Unexpected end of file while parsing Comment has occurred. Line 36, position 1.
24
24
25
25
// BenchmarkDotNet has failed to build the auto-generated boilerplate code.
26
-
// It can be found in C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\net8.0\c6045772-d3c7-4dbe-ab37-4aca6dcb6ec4
26
+
// It can be found in C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\netcoreapp2.1\c6045772-d3c7-4dbe-ab37-4aca6dcb6ec4
27
27
// Please follow the troubleshooting guide: https://benchmarkdotnet.org/articles/guides/troubleshooting.html
0 commit comments