Skip to content

Commit e1353c7

Browse files
replace dotnet.config with global.json
1 parent 248dc83 commit e1353c7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

docs/core/tools/dotnet-test.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,24 @@ ms.date: 03/27/2024
1111

1212
## Description
1313

14-
The `dotnet test` command builds the solution and runs the tests with either VSTest or Microsoft Testing Platform (MTP). To enable MTP, you need to add a config file named `dotnet.config` with an INI-like format located at the root of the solution or repository.
14+
The `dotnet test` command builds the solution and runs the tests with either VSTest or Microsoft Testing Platform (MTP). To enable MTP, you need to specify the test runner in the `global.json` file.
1515

16-
Some examples of the `dotnet.config` file:
16+
Some examples of how to specify the test runner in the `global.json` file:
1717

18-
```ini
19-
[dotnet.test.runner]
20-
name = "Microsoft.Testing.Platform"
18+
```json
19+
{
20+
"test": {
21+
"runner": "Microsoft.Testing.Platform"
22+
}
23+
}
2124
```
2225

23-
```ini
24-
[dotnet.test.runner]
25-
name = "VSTest"
26+
```json
27+
{
28+
"test": {
29+
"runner": "VSTest"
30+
}
31+
}
2632
```
2733

2834
> [!IMPORTANT]
@@ -448,7 +454,7 @@ dotnet test -h|--help
448454
With Microsoft Testing Platform, `dotnet test` operates faster than with VSTest. The test-related arguments are no longer fixed, as they are tied to the registered extensions in the test project(s). Moreover, MTP supports a globbing filter when running tests. For more information, see [Microsoft.Testing.Platform](../testing/microsoft-testing-platform-intro.md).
449455

450456
> [!WARNING]
451-
> When Microsoft.Testing.Platform is opted in via `dotnet.config`, `dotnet test` expects all test projects to use Microsoft.Testing.Platform. It is an error if any of the test projects use VSTest.
457+
> When Microsoft.Testing.Platform is opted in via `global.json`, `dotnet test` expects all test projects to use Microsoft.Testing.Platform. It is an error if any of the test projects use VSTest.
452458
453459
#### Implicit restore
454460

0 commit comments

Comments
 (0)