Skip to content

Update dependencies and target framework to .NET 10.0#85

Merged
nGoline merged 4 commits intomainfrom
feature/upgrade-dotnet-to-10
Mar 18, 2026
Merged

Update dependencies and target framework to .NET 10.0#85
nGoline merged 4 commits intomainfrom
feature/upgrade-dotnet-to-10

Conversation

@nGoline
Copy link
Copy Markdown
Owner

@nGoline nGoline commented Mar 18, 2026

No description provided.

Signed-off-by: Níckolas Goline <nickolas.goline+github@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 18, 2026

Combined Test Results

   17 files     17 suites   37s ⏱️
  922 tests   922 ✅ 0 💤 0 ❌
1 836 runs  1 836 ✅ 0 💤 0 ❌

Results for commit e58aa0f.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the repository to target .NET 10.0 and updates a broad set of dependencies and CI workflows to match the new SDK baseline.

Changes:

  • Retarget projects from net9.0 (and net8.0;net9.0) to net10.0, updating test projects and shared build props.
  • Update key dependencies (EF Core/Npgsql, Microsoft.Extensions.*, coverlet, LNUnit, NBitcoin, etc.) and adjust a few code paths for newer APIs.
  • Update CI workflows, docs, and auxiliary tooling (Docker LND version, migration scripts) to align with .NET 10.

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/NLightning.Tests.Utils/NLightning.Tests.Utils.csproj Retarget to net10; update LNUnit and test/project properties.
test/NLightning.Node.Tests/NLightning.Node.Tests.csproj Retarget to net10; update coverlet and test SDK packages.
test/NLightning.Integration.Tests/NLightning.Integration.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Infrastructure.Tests/NLightning.Infrastructure.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Infrastructure.Serialization.Tests/NLightning.Infrastructure.Serialization.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Infrastructure.Bitcoin.Tests/NLightning.Infrastructure.Bitcoin.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Domain.Tests/ValueObjects/ChannelIdTests.cs Update using directives and formatting.
test/NLightning.Domain.Tests/ValueObjects/ChainHashTests.cs Update using directives.
test/NLightning.Domain.Tests/ValueObjects/BigSizeTests.cs Update using directives and formatting/wrapping.
test/NLightning.Domain.Tests/NLightning.Domain.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Bolt11.Tests/NLightning.Bolt11.Tests.csproj Retarget to net10; update coverlet/test SDK packages and properties.
test/NLightning.Bolt11.Tests/Models/TaggedFields/MinFinalCltvExpiryTaggedFieldTests.cs Update using directives.
test/NLightning.Bolt11.Tests/Models/TaggedFields/MetadataTaggedFieldTests.cs Update using directives.
test/NLightning.Bolt11.Tests/Models/TaggedFields/FeaturesTaggedFieldTests.cs Update using directives and formatting.
test/NLightning.Bolt11.Tests/Models/TaggedFields/ExpiryTimeTaggedFieldTests.cs Update using directives.
test/NLightning.Bolt11.Tests/Models/TaggedFields/DescriptionTaggedFieldTests.cs Update using directives and reformat InlineData payloads.
test/NLightning.Bolt11.Tests/Models/TaggedFieldListTests.cs Update using directives.
test/NLightning.Application.Tests/NLightning.Application.Tests.csproj Retarget to net10; update coverlet/NBitcoin; keep Microsoft.NET.Test.Sdk pinned.
test/Docker/custom_lnd/Dockerfile Bump LND version used in tests.
test/BlazorTests/NLightning.BlazorTestApp/NLightning.BlazorTestApp.csproj Retarget to net10; bump Blazor WASM packages and add hot reload package.
test/BlazorTests/NLightning.Blazor.Tests/NLightning.Blazor.Tests.csproj Retarget to net10; bump MVC testing and Playwright packages.
src/NLightning.Node/NLightning.Node.csproj Remove explicit TF/property defaults and bump Microsoft.Extensions + Npgsql/Serilog dependencies.
src/NLightning.Node/Helpers/AesGcmHelper.cs Switch to Rfc2898DeriveBytes.Pbkdf2 API.
src/NLightning.Infrastructure/NLightning.Infrastructure.csproj Bump libsodium and Microsoft.Extensions.* packages.
src/NLightning.Infrastructure.Serialization/ValueObjects/ShortChannelIdTypeSerializer.cs Update using directives and minor formatting.
src/NLightning.Infrastructure.Serialization/NLightning.Infrastructure.Serialization.csproj Remove explicit TF list and rely on shared props; formatting cleanup.
src/NLightning.Infrastructure.Repositories/NLightning.Infrastructure.Repositories.csproj Remove explicit TF/property defaults and rely on shared props.
src/NLightning.Infrastructure.Repositories/Memory/ChannelMemoryRepository.cs Remove some argument null checks for temporary channel methods.
src/NLightning.Infrastructure.Persistence/scripts/remove_migration.sh Update EF/migration scripting and framework selection (currently broken).
src/NLightning.Infrastructure.Persistence/scripts/add_migration.sh Remove explicit framework parameter from build/EF commands.
src/NLightning.Infrastructure.Persistence/NLightning.Infrastructure.Persistence.csproj Bump EF Core packages to 10.0.x and remove explicit multi-targeting.
src/NLightning.Infrastructure.Persistence.Sqlite/NLightning.Infrastructure.Persistence.Sqlite.csproj Bump EF Core packages to 10.0.x and remove explicit multi-targeting.
src/NLightning.Infrastructure.Persistence.Sqlite/Migrations/NLightningDbContextModelSnapshot.cs Update EF Core model snapshot ProductVersion.
src/NLightning.Infrastructure.Persistence.SqlServer/NLightning.Infrastructure.Persistence.SqlServer.csproj Bump EF Core packages to 10.0.x and remove explicit multi-targeting.
src/NLightning.Infrastructure.Persistence.Postgres/NLightning.Infrastructure.Persistence.Postgres.csproj Bump EF Core/Npgsql provider packages to 10.0.x and remove explicit multi-targeting.
src/NLightning.Infrastructure.Bitcoin/Wallet/BlockchainMonitorService.cs Simplify blocks-to-process collection to OrderedDictionary unconditionally.
src/NLightning.Infrastructure.Bitcoin/NLightning.Infrastructure.Bitcoin.csproj Bump MessagePack/NBitcoin/Secp256k1/NetMQ packages.
src/NLightning.Domain/Protocol/Payloads/PingPayload.cs Comment wording tweak.
src/NLightning.Bolt11/Models/Invoice.cs Formatting/nullability annotation tweak for TryGetAll out variable.
src/NLightning.Application/NLightning.Application.csproj Bump Microsoft.Extensions.* packages; minor project items cleanup.
src/Directory.Build.props Switch to net10 as shared TF; add deterministic + test/pack defaults (problematic).
global.json Pin SDK version to 10.0.0.
README.md Update .NET badge/SDK link (remaining text still refers to 9.x).
NLightning.sln Add src/Directory.Build.props as solution items in folders.
.github/workflows/pr.yml Update CI to use .NET 10.0.x.
.github/workflows/pr.wasm.yml Update CI to use .NET 10.0.x.
.github/workflows/pr.native.yml Update CI to use .NET 10.0.x.
.github/workflows/pr.combined-report.yml Update CI to use .NET 10.0.x.
.github/workflows/gh-pages.yml Update gh-pages workflow to setup-dotnet@v4 and .NET 10.0.x; formatting cleanup.
.github/workflows/dotnet.yml Update CI to use .NET 10.0.x.
.github/workflows/dotnet.wasm.yml Update CI to use .NET 10.0.x.
.github/workflows/dotnet.native.yml Update CI to use .NET 10.0.x.
.github/workflows/combined-report.yml Update CI to use .NET 10.0.x.
.docfx/docs/quickstart/quickstart.md Update quickstart prerequisites to .NET 10.0.
Comments suppressed due to low confidence (2)

src/NLightning.Infrastructure.Repositories/Memory/ChannelMemoryRepository.cs:83

  • AddChannel/UpdateChannel still validate channel with ThrowIfNull, but the temporary-channel methods no longer validate the channel argument at all. Since channel is a reference type, passing null will now result in a NullReferenceException when accessing channel.ChannelId. Keep the null guard for channel here for consistent and clearer argument validation (null checks for CompactPubKey/ChannelId aren’t needed since they’re structs).
    public void AddTemporaryChannel(CompactPubKey compactPubKey, ChannelModel channel)
    {
        if (!_temporaryChannels.TryAdd((compactPubKey, channel.ChannelId), channel))
            throw new InvalidOperationException(
                $"Temporary channel with Id {channel.ChannelId} for CompactPubKey {compactPubKey} already exists.");

README.md:62

  • README prerequisites text is inconsistent with the .NET 10 update: it still says “any later 9.x version” and the following paragraph still describes global.json pinning to 9.0.0 / only supporting 9.x. Update this section to match the new global.json (10.0.0) and supported SDK range (10.x).
- [.NET 10.0 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or any later 9.x version
- Git (for cloning the repository)

This project uses a global.json file to pin the .NET SDK to version 9.0.0, but with rollForward:
"latestMinor" it will accept any newer 9.x release (e.g., 9.1.x, 9.2.x).
You must have .NET SDK 9.0.0 or later within the 9.x line installed.
SDK versions outside the 9.x line (e.g., 8.x or 10.x) are not supported.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

nGoline added 3 commits March 18, 2026 15:01
upgrade xunit;
fix test warnings;

Signed-off-by: Níckolas Goline <nickolas.goline+github@gmail.com>
Signed-off-by: Níckolas Goline <nickolas.goline+github@gmail.com>
Signed-off-by: Níckolas Goline <nickolas.goline+github@gmail.com>
@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
NLightning.Application 0% 0% 258
NLightning.Bolt11 89% 84% 502
NLightning.Bolt11.Blazor 0% 0% 434
NLightning.Domain 66% 48% 1571
NLightning.Infrastructure 56% 47% 1004
NLightning.Infrastructure.Bitcoin 56% 50% 467
NLightning.Infrastructure.Persistence 0% 0% 156
NLightning.Infrastructure.Persistence.Postgres 0% 100% 7
NLightning.Infrastructure.Persistence.Sqlite 0% 100% 4
NLightning.Infrastructure.Persistence.SqlServer 0% 100% 7
NLightning.Infrastructure.Repositories 0% 0% 474
NLightning.Infrastructure.Serialization 67% 51% 861
NLightning.Node 10% 12% 215
NLightning.Tests.Utils 83% 50% 19
Summary 40% (6284 / 15892) 41% (1691 / 4113) 5979

@nGoline nGoline merged commit 7003e58 into main Mar 18, 2026
5 checks passed
@nGoline nGoline deleted the feature/upgrade-dotnet-to-10 branch March 18, 2026 18:39
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.

2 participants