NET9 Support
Changes that are needed in order to support .NET 9.0 #4846
Work in progress PR in order to prepare for the release of version 9.0.
@dotnet-policy-service agree
It looks like the linux build failed due to: terminate called after throwing an instance of 'PAL_SEHException'
This is normally a "illegal pointed" which in managed code we should not have.
We will revisit once .NET 9.0 is released.
I think so to. I spent some time trying to figure out what the issue could be, but it is likely related to some internal things of .NET. Build is failing with the same exception on MacOS.
I've tried rerunning the builds as RC2 was released this past Tuesday. The present state is all three builds (Windows, Linux, Mac) fail with the following error:
Error: /home/runner/work/nunit/nunit/src/NUnitFramework/windows-tests/obj/Release/net8.0-windows10.0.19041.0/WinRT.SourceGenerator/Generator.WinRTAotSourceGenerator/WinRTGlobalVtableLookup.g.cs(5,25): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [/home/runner/work/nunit/nunit/src/NUnitFramework/windows-tests/windows-tests.csproj::TargetFramework=net8.0-windows10.0.19041.0]
We'll have to look into this
I will look into it This Weekend. Thank you for trying with the new RC.
This may actually be unrelated to .NET 9, and instead related related to a change in the latest version of the SDK.
There's a workaround listed here: https://github.com/dotnet/sdk/issues/44026
@Lachstec This fix may actually be better as a separate PR so that main can continue to build. We'd welcome a second PR here if you're interested, or I could put one up myself sometime this weekend if you can't.
@stevenaw Thought so, as I already stumbled on this Issue while trying to fix the build. I will open a PR with the fix mentioned there in a minute.
Tests are passing, so we should be good to go when version 9 drops.
.NET 9 has launched today 🎉
@Lachstec The PR is listed as a Draft. Is it ready for review on your end?
@manfred-brands you'd previously requested some changes here. Does it look alright to you now?
CI fails because of formatting issues. Should I address them in a separate pr?
CI fails because of formatting issues. Should I address them in a separate pr?
Ok, if the changes to the StaticProperty is because of the new net9.0 target, then leave it in (revert the revert)
No problem, hope that it works out now ;)
LGTM. Thanks for your contribution @Lachstec !