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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,24 @@ Our current algorithm is
14
14
15
15
So if you set global.json to a 9.0.xxx SDK, you'll _always_ use the 9.x MSBuild libraries, which will require the 9.0 runtime to load. If you want to test while loading older MSBuilds, you'll need to somehow constraint the tests to 8.0.xxx SDKs, and the easiest way to do this is to make a global.json with a 8.0.xxx version and a `rollForward: latestPatch` constraint on it.
16
16
17
-
### Against LTS (net8.0)
18
-
1. Run tests with `dotnet run --project .\build\ -- -t Test`
19
-
1. This should chose the `Test:net8.0` target and run against that runtime
17
+
### Running tests from FAKE
20
18
19
+
Our FAKE build project will handle creating/deleting a temporary `global.json` file in the `test` directory for you.
21
20
22
-
### Against STS (net9.0)
21
+
1.`dotnet run --project .\build\ -- -t Test`
22
+
1. This should chose the `Test:net8.0` and `Test:net9.0` targets and run against that respective runtime.
23
+
24
+
### Manually invoking dotnet test
25
+
26
+
If you want to run `dotnet test` directly, you'll need to set the `global.json` file and environment variables yourself.
27
+
28
+
#### Against LTS (net8.0)
29
+
1. Move to the test project
30
+
1.`cd test/Ionide.ProjInfo.Tests`
31
+
2. Run tests with `dotnet test`
32
+
33
+
34
+
#### Against STS (net9.0)
23
35
1. Change global.json to use net9.0
24
36
```json
25
37
"sdk": {
@@ -28,11 +40,16 @@ So if you set global.json to a 9.0.xxx SDK, you'll _always_ use the 9.x MSBuild
28
40
"allowPrerelease": true
29
41
}
30
42
```
31
-
2. Set environment variable `BuildNet9` to `true`
43
+
1. Move to the test project
44
+
1. `cd test/Ionide.ProjInfo.Tests`
45
+
3. Set environment variable `BuildNet9` to `true`
32
46
1. Bash: `export BuildNet9=true`
33
47
2. PowerShell: `$env:BuildNet9 = "true"`
34
-
3. Run tests with `dotnet run --project .\build\ -- -t Test`
35
-
1. This should chose the `Test:net9.0` target and run against that runtime
0 commit comments