Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

EncDotNet is a set of .NET libraries for reading, parsing and writing **IHO
S-57 Electronic Navigational Charts (ENCs)** and the **ISO/IEC 8211**
container format they use. The libraries target `net8.0;net10.0`; tests
target `net10.0`. The repository also holds a legacy desktop viewer
container format they use. The libraries and tests target `net10.0`. The repository also holds a legacy desktop viewer
(`EncDotNet.ChartViewer`) that is kept building but not developed; chart
display work happens in EncDotNet.S100. `<Nullable>enable</Nullable>` and
`<ImplicitUsings>enable</ImplicitUsings>` apply throughout.
Expand Down Expand Up @@ -58,7 +57,7 @@ depends on `S57` and `Noaa`.

| Concern | Library / tool |
|---|---|
| Language / platform | C#, .NET 10 (libraries also target .NET 8) |
| Language / platform | C#, .NET 10 |
| Legacy viewer | Avalonia 11, ReactiveUI, Mapsui 5, NetTopologySuite, MessagePack |
| Observability | Microsoft.Extensions.Logging, OpenTelemetry |
| Testing | xUnit v3, coverlet; BenchmarkDotNet |
Expand Down
48 changes: 47 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Verify formatting, usings and naming
# The root command verifies whitespace, and the diagnostic filter
# limits code-style analysis to using directives (IDE0005) and naming
# (IDE1006). One invocation loads the multi-targeted solution once.
# (IDE1006). One invocation loads the solution once.
# Fix whitespace and usings locally with `dotnet format whitespace` and
# `dotnet format style --diagnostics IDE0005`; fix naming by hand.
run: >
Expand Down Expand Up @@ -135,6 +135,52 @@ jobs:
name: test-results-${{ matrix.name }}
path: TestResults/*.trx

test-net11:
# Forward-compatibility check: the packages target net10.0 only, so on
# .NET 11 consumers run the net10.0 build. Build with the .NET 10 SDK as
# usual, then run the same tests on the newest runtime installed.
name: Test on .NET 11
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v5

- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

# Installed after the build so the build uses the .NET 10 SDK. Drop
# dotnet-quality once .NET 11 is generally available.
- name: Setup .NET 11
uses: actions/setup-dotnet@v4
with:
dotnet-version: '11.0.x'
dotnet-quality: 'preview'

- name: Test
env:
# Run the net10.0 test hosts on the latest installed runtime, even
# when it's a prerelease, instead of the .NET 10 runtime.
DOTNET_ROLL_FORWARD: LatestMajor
DOTNET_ROLL_FORWARD_TO_PRERELEASE: '1'
run: dotnet test --no-build --configuration Release --logger trx --results-directory TestResults

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-net11
path: TestResults/*.trx

publish:
needs: build
strategy:
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ covers how to build, test and submit changes.

## Prerequisites

- The [.NET 10 SDK](https://dotnet.microsoft.com/download). The libraries also
target .NET 8; the .NET 10 SDK builds both.
- The [.NET 10 SDK](https://dotnet.microsoft.com/download).
- A Git client.

## Build and test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ EncDotNet is a set of .NET libraries for
and the [ISO/IEC 8211](https://www.iso.org/standard/7688.html) files they're
encoded in. The libraries read and write ISO 8211, read S-57 cells, apply
update cells, verify exchange sets, and find cells in the NOAA product catalog.
They target .NET 8 and .NET 10.
They target .NET 10.

[EncDotNet.S100](https://github.com/philliphoff/EncDotNet.S100) builds on
these libraries to read S-101 and to translate S-57 cells to S-101.
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ and list its depth areas with their depth ranges and positions.

## Prerequisites

- The [.NET SDK](https://dotnet.microsoft.com/download) 8 or later. The
packages target .NET 8 and .NET 10.
- The [.NET SDK](https://dotnet.microsoft.com/download) 10 or later. The
packages target .NET 10.
- An S-57 base cell (a `.000` file). NOAA publishes U.S. cells for free; see
[Download NOAA ENC cells](download-noaa-charts.md), or download one from the
[NOAA ENC page](https://charts.noaa.gov/ENCs/ENCs.shtml).
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
EncDotNet reads IHO S-57 Electronic Navigational Charts and the ISO/IEC 8211
files they're encoded in, in .NET. Its libraries read and write ISO 8211, read
S-57 cells, apply update cells, verify exchange sets, and find cells in the
NOAA product catalog. They target .NET 8 and .NET 10.
NOAA product catalog. They target .NET 10.

[EncDotNet.S100](https://github.com/philliphoff/EncDotNet.S100) builds on
these libraries to read S-101 and to translate S-57 cells to S-101.
Expand Down
10 changes: 7 additions & 3 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ packages, plus their documented behavior. It doesn't include:

## Supported frameworks

Each package targets .NET 8 and .NET 10. Dropping a target framework is a
breaking change.
Each package targets .NET 10, the current long-term support release, and runs
on later .NET versions; CI also runs the tests on the newest .NET release.
The packages drop a .NET version once Microsoft ends its support. Dropping a
target framework is a breaking change: 0.11.0 dropped .NET 8, which reached
end of support in November 2026. 0.10.0 is the last release that targets
.NET 8.

## How breaking changes are caught

Each pack compares the new package with its last published release on
nuget.org, using
[package validation](https://learn.microsoft.com/dotnet/fundamentals/apicompat/package-validation/overview).
It fails the build when a public type or member is removed or changed in an
incompatible way, or when the .NET 8 and .NET 10 builds expose different APIs.
incompatible way, or when a target framework is dropped.
The baseline version is `PackageValidationBaselineVersion` in
[`src/Directory.Build.props`](https://github.com/philliphoff/EncDotNet/blob/main/src/Directory.Build.props).

Expand Down
24 changes: 15 additions & 9 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@

<!-- Package compatibility: package validation compares each library with
its last published release on nuget.org and fails the pack on a
breaking change to the public API (or on inconsistencies between the
net8.0 and net10.0 builds). Raise the baseline to each new release once
it's published, so APIs added in it are protected too. -->
breaking change to the public API. Raise the baseline to each new
release once it's published, so APIs added in it are protected too. -->
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>0.9.0</PackageValidationBaselineVersion>
</PropertyGroup>

<!-- 0.11.0 drops net8.0, which reached end of support in November 2026;
0.10.0 was the last release to ship it. The baseline still ships a
net8.0 build, so tell package validation that dropping it is
intentional (otherwise PKV006). Remove this once the baseline is
0.11.0 or later. -->
<ItemGroup Condition="'$(IsPackable)' != 'false'">
<PackageValidationBaselineFrameworkToIgnore Include="net8.0" />
</ItemGroup>

<!-- Local and pull request builds carry the 0.0.0-dev placeholder version,
which is lower than any baseline. Skip only the assembly-version
ordering rule (CP0003) for those builds; API compatibility is still
Expand All @@ -54,12 +62,10 @@

<!-- Libraries are trimmable: the trim analyzers run in every build and, with
TreatWarningsAsErrors, keep reflection that can't be statically analysed
out of them. Analysed on the net10.0 target only, because IsTrimmable on
net8.0 would pull in the net8.0 ILLink pack. The viewer is an app, not a
library. EncDotNet.Noaa deserializes the catalog with XmlSerializer,
which isn't trim-safe; it stays out until that parser is replaced. -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'
And '$(MSBuildProjectName)' != 'EncDotNet.ChartViewer'
out of them. The viewer is an app, not a library. EncDotNet.Noaa
deserializes the catalog with XmlSerializer, which isn't trim-safe; it
stays out until that parser is replaced. -->
<PropertyGroup Condition="'$(MSBuildProjectName)' != 'EncDotNet.ChartViewer'
And '$(MSBuildProjectName)' != 'EncDotNet.Noaa'">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/EncDotNet.Iso8211/EncDotNet.Iso8211.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework></TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<Description>A .NET parser for the ISO/IEC 8211 binary container format, the underlying encoding used by IHO S-57 electronic navigational charts and other geospatial data standards.</Description>
<PackageTags>iso8211;iso-8211;binary-parser;s57;s-57;enc;nautical-chart;hydrographic;geospatial;maritime</PackageTags>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/EncDotNet.Iso8211/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ standards. It decodes the Data Descriptive Record (DDR), data records, fields
and subfield values, writes documents back out, and builds new ones. It has
no knowledge of S-57; reference
[`EncDotNet.S57`](https://www.nuget.org/packages/EncDotNet.S57) instead if
you want chart features. The package targets .NET 8 and .NET 10.
you want chart features. The package targets .NET 10.

## Install

Expand Down
2 changes: 0 additions & 2 deletions src/EncDotNet.Noaa/EncDotNet.Noaa.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework></TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<Description>A .NET client for the NOAA ENC product catalog, for discovering and downloading U.S. electronic navigational chart data.</Description>
<PackageTags>noaa;enc;nautical-chart;s57;s-57;hydrographic;maritime;navigation;chart-data;geospatial</PackageTags>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/EncDotNet.Noaa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coverage, the states, regions and Coast Guard districts it covers, and the
URL of its ZIP file. Reference it to find and download U.S. cells; read the
downloaded cells with
[`EncDotNet.S57`](https://www.nuget.org/packages/EncDotNet.S57). The package
targets .NET 8 and .NET 10.
targets .NET 10.

## Install

Expand Down
2 changes: 0 additions & 2 deletions src/EncDotNet.S57/EncDotNet.S57.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework></TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<Description>A .NET library for reading and working with IHO S-57 Electronic Navigational Charts (ENCs), including feature records, vector topology, exchange sets, and incremental updates.</Description>
<PackageTags>s57;s-57;enc;nautical-chart;hydrographic;maritime;navigation;iho;electronic-navigational-chart;geospatial;gis</PackageTags>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/EncDotNet.S57/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ applies update cells (`.001`, `.002`, ...), reads and verifies exchange sets,
and writes base cells and `CATALOG.031` files. It identifies NATO
Additional Military Layers (AML) cells and looks up their object classes and
attributes in the AML object catalogues. Reference it to work with S-57
data in .NET 8 or .NET 10. It depends on
data in .NET 10 or later. It depends on
[`EncDotNet.Iso8211`](https://www.nuget.org/packages/EncDotNet.Iso8211),
which it installs for you.

Expand Down
Loading