Skip to content

Conversation

@erwan-joly
Copy link
Contributor

  • Updated all .csproj files to target net10.0
  • Updated NuGet packages to version 10.0.0:
    • Microsoft.Bcl.AsyncInterfaces
    • Microsoft.Extensions.Configuration.Binder
    • Microsoft.EntityFrameworkCore
    • Microsoft.Extensions.DependencyModel
    • Npgsql.EntityFrameworkCore.PostgreSQL
    • Microsoft.EntityFrameworkCore.Sqlite
  • Updated GitHub Actions workflow to use .NET 10.0.x

- Updated all .csproj files to target net10.0
- Updated NuGet packages to version 10.0.0:
  - Microsoft.Bcl.AsyncInterfaces
  - Microsoft.Extensions.Configuration.Binder
  - Microsoft.EntityFrameworkCore
  - Microsoft.Extensions.DependencyModel
  - Npgsql.EntityFrameworkCore.PostgreSQL
  - Microsoft.EntityFrameworkCore.Sqlite
- Updated GitHub Actions workflow to use .NET 10.0.x
- Updated Npgsql.EntityFrameworkCore.PostgreSQL to 10.0.0-rc.2 (latest version compatible with EF Core 10)
- Removed Microsoft.Bcl.AsyncInterfaces package (built-in to .NET 10, no longer needed)

All other packages are using stable 10.0.0 versions:
- Microsoft.EntityFrameworkCore: 10.0.0
- Microsoft.Extensions.Configuration.Binder: 10.0.0
- Microsoft.Extensions.DependencyModel: 10.0.0
- Microsoft.EntityFrameworkCore.Sqlite: 10.0.0
- Updated actions/checkout from v2 to v4
- Updated actions/setup-dotnet from v3 to v4
- Replaced deprecated ::set-output commands with $GITHUB_OUTPUT
- Replaced deprecated actions/upload-release-asset@v1 with softprops/action-gh-release@v2
- Removed unnecessary jossef/action-latest-release-info action

These changes ensure the workflow is compatible with current GitHub Actions standards and will work properly with .NET 10.
- Replace Assert.IsTrue with Assert.AreEqual as recommended by MSTest analyzer
- Changed from Assert.IsTrue(!...Any()) to Assert.AreEqual(0, ...Count())
- This provides clearer test failure messages and follows modern MSTest best practices
- Added comprehensive XML documentation comments to all public interfaces:
  - IPathfinder, IMapGrid, IHeuristic
- Added XML documentation to all public classes:
  - JumpPointSearchPathfinder
  - GoalBasedPathfinder
  - OctileDistanceHeuristic
- Documented all public constructors, properties, methods, and fields
- Removed NoWarn CS1591 directive from project file

This ensures proper API documentation is generated and enforces documentation requirements through TreatWarningsAsErrors.
- Documented Node class with all properties (Closed, Parent, F, Position, Value)
- Documented JumpNode class with JPS-specific properties (G, H, Opened)
- Documented BrushFire struct with all properties and indexer
- Documented IMapGridExtension static class with extension methods:
  - GetNeighbors: Gets neighboring cells in the grid
  - LoadBrushFire: Computes brushfire distance map

All public APIs now have complete XML documentation.
- Upgraded from 4.5.0 to 10.0.0 for .NET 10 compatibility
- Fixes DllNotFoundException on Linux with libdl
- Resolves critical security vulnerability (GHSA-rxg9-xrhp-64gj)

The old version had compatibility issues with .NET 10 on Linux and caused
tests to fail with DllNotFoundException when loading System.Drawing.Common.
System.Drawing.Common 10.0.0 requires the libgdiplus native library on Linux.
Added installation step in GitHub Actions workflow to ensure tests can run successfully.
Package updates:
- Mapster: 7.3.0 → 7.4.0
- Serilog: 2.12.0 → 4.3.0
- NetEscapades.Configuration.Yaml: 2.2.0 → 3.1.0
- ApprovalTests: 5.7.3 → 7.0.0
- Microsoft.NET.Test.Sdk: 17.4.0 → 18.0.1
- Moq: 4.18.2 → 4.20.72
- MSTest.TestAdapter: 2.2.10 → 4.0.2
- MSTest.TestFramework: 2.2.10 → 4.0.2
- BenchmarkDotNet: 0.13.2 → 0.15.7

All packages are now at their latest stable versions compatible with .NET 10.
Security fixes:
- Override System.Drawing.Common 4.5.0 → 10.0.0 (fixes critical vulnerability GHSA-rxg9-xrhp-64gj)
- Override Microsoft.IdentityModel.JsonWebTokens 6.10.0 → 8.14.0 (fixes moderate vulnerability GHSA-59j7-ghrg-fj52)
- Override System.IdentityModel.Tokens.Jwt 6.10.0 → 8.14.0 (fixes moderate vulnerability GHSA-59j7-ghrg-fj52)

Other improvements:
- Removed Microsoft.Extensions.Configuration.Binder (unnecessary in .NET 10)
Run ldconfig to update the dynamic linker cache after installing libgdiplus,
ensuring the library is properly registered and discoverable by .NET runtime.
…inux

.NET runtime looks for 'gdiplus.dll' but libgdiplus installs as 'libgdiplus.so' on Linux.
Creating a symbolic link allows the runtime to find the library correctly.
System.Drawing.Common 10.0.0 explicitly requires opt-in for non-Windows platforms.
Adding runtimeconfig.template.json with System.Drawing.EnableUnixSupport=true
to allow tests using System.Drawing to run on Linux CI runners.
Replace runtimeconfig.template.json with explicit RuntimeHostConfigurationOption
in the project file for better control over runtime configuration.
- Add MSTest parallelization configuration to suppress MSTEST0001
- Suppress CA1416 platform compatibility warnings (Unix support is explicitly enabled)
- Fix CS8604 nullable reference warning in NosCoreContext constructor
- Add DOTNET_SYSTEM_DRAWING_ENABLEUNIXSUPPORT environment variable to GitHub Actions
- Fix CS8604 null reference warning in DataAccessHelper.CreateContext()
- Environment variable approach is more reliable than RuntimeHostConfigurationOption for static initializers
- Use ModuleInitializer to set AppContext switch before static initializers run
- Fix environment variable name format (DOTNET_System_Drawing_EnableUnixSupport)
- ModuleInitializer runs before any static constructors, ensuring Unix support is enabled early
- Change StringFormat from static field to lazy-initialized property
- Defers System.Drawing.Common initialization until after ModuleInitializer runs
- Ensures AppContext.SetSwitch is called before any GDI+ interop occurs
- System.Drawing.Common only supports Windows in .NET 10+
- Unix support was removed in .NET 7 and is not available in .NET 10
- Visualization tests marked as Inconclusive on Linux/macOS
- Core pathfinding logic tests still run on all platforms
- Downgrade from 10.0.0 to 6.0.0 which has Unix support
- Remove platform-conditional test guards
- Keep RuntimeHostConfigurationOption and ModuleInitializer for Unix support
- System.Drawing.Common 6.0.0 is the last version with EnableUnixSupport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants