-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added multi-build for net472 (client) and netstandard 2.0 (server) #1972
Conversation
f40239f
to
6caf658
Compare
Issue with netstandard and Nitrox.BinaryPack wasn't related. Instead a breaking change with string comparison in new .NET 5+ runtimes caused wrong serializer type order. Co-authored-by: TwinBuilderOne <[email protected]>
These tests have been broken for a long time and soon we'll have source generators that help fix serializing issues.
The unit tester needs a .netstandard 2.0 reference to run tests properly without warnings.
380702e
to
6fcb131
Compare
This PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some new warnings happening after this PR modifications:
6>[...]\NitroxServer-Subnautica\Resources\Parsers\RandomStartParser.cs(31,28,31,58): warning CA1416: This call site is reachable on all platforms. 'RotateFlipType.RotateNoneFlipY' is only supported on: 'windows'.
6>[...]\NitroxServer-Subnautica\Resources\Parsers\RandomStartParser.cs(31,9,31,59): warning CA1416: This call site is reachable on all platforms. 'Image.RotateFlip(RotateFlipType)' is only supported on: 'windows'.
6>[...]\NitroxServer-Subnautica\Resources\Parsers\RandomStartParser.cs(29,98,29,125): warning CA1416: This call site is reachable on all platforms. 'PixelFormat.Format32bppArgb' is only supported on: 'windows'.
6>[...]\NitroxServer-Subnautica\Resources\Parsers\RandomStartParser.cs(29,26,30,80): warning CA1416: This call site is reachable on all platforms. 'Bitmap' is only supported on: 'windows'.
6>[...]\NitroxServer-Subnautica\Resources\AddressablesTools\Catalog\SerializedObjectDecoder.cs(64,28,64,64): warning CA1416: This call site is reachable on all platforms. 'Type.GetTypeFromCLSID(Guid)' is only supported on: 'windows'.
NitroxModel-Subnautica/DataStructures/GameLogic/Entities/SubnauticaUwePrefabFactory.cs
Outdated
Show resolved
Hide resolved
Also breaks tests |
For the servers to work on linux, System.Drawing needs to be replaced with SkiaSharp or ImageSharp. |
This is something I'll look into in the |
I've set the runtime to windows only until the code is ready for linux (will happen in linux branch). |
…uticaUwePrefabFactory.cs Co-authored-by: rootcan <[email protected]>
Co-authored-by: rootcan <[email protected]>
Co-authored-by: rootcan <[email protected]>
5ae267a
to
e7b366a
Compare
I think I solved those issues now Tornac 🙏 . Parallel builds will still show warnings on file locks, but it should work regardless. I will migrate the launcher over to .net 7 in linux branch which will make it better compatible with normal MSBuild flow (using project references). |
40befc7
to
870bb21
Compare
…d2.0 NitroxClient and NitroxPatcher should be loaded as netstandard2.0 for testing only (Subnautica does not fully support netstandard2.0 APIs)
Changes in this PR were merged into #1848 |
Find alternative serializer for .netstandard 2.0, BinaryPack supports 2.1 only and Nitrox.BinaryPack for net472 does not work with 2.0 as is.Issue found by TwinBuilderOne, breaking change in .NET 5+ caused wrong union order for packets due to culture string compare: https://learn.microsoft.com/en-us/dotnet/standard/base-types/string-comparison-net-5-plus