- Clone repo.
- Install local tools with
dotnet tool restore
Testing against different .NET runtimes is a bit of a chore because we want to let the runtime load the current runtime's Microsoft.Build assemblies. Unfortunately, we can't have the global.json
set to net9.0
because the Microsoft.Build
assemblies are compatible with the .NET 9 runtime, and will try to load them, even in a net8.0 TFM context.
Our current algorithm is
- run
dotnet --version
in the workspace directory - use the output of that to determine which SDK to load from
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.
Our FAKE build project will handle creating/deleting a temporary global.json
file in the test
directory for you.
dotnet run --project .\build\ -- -t Test
- This should chose the
Test:net8.0
andTest:net9.0
targets and run against that respective runtime.
- This should chose the
If you want to run dotnet test
directly, you'll need to set the global.json
file and environment variables yourself.
- Move to the test project
cd test/Ionide.ProjInfo.Tests
- Run tests with
dotnet test
- Change global.json to use net9.0
"sdk": { "version": "9.0.100", "rollForward": "latestMinor", "allowPrerelease": true }
- Move to the test project
cd test/Ionide.ProjInfo.Tests
- Set environment variable
BuildNet9
totrue
- Bash:
export BuildNet9=true
- PowerShell:
$env:BuildNet9 = "true"
- Bash:
- Run tests with
dotnet test
- Update version in CHANGELOG.md and add notes
- If possible link the pull request of the changes and mention the author of the pull request
- Create new commit
git add CHANGELOG.md
git commit -m "changelog for v0.45.0"
- Make a new version tag (for example,
v0.45.0
)git tag v0.45.0
- Push changes to the repo.
git push --atomic origin main v0.45.0
To use the -nightly
packages, you'll need to add a custom nuget feed for FSharp.Compiler.Service: