Migrate to .NET 10#2444
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Furly.* 1.1.56 -> 1.2.1 (14 packages) - Microsoft.Extensions.*, Microsoft.AspNetCore.Mvc.Testing, System.Text.Json, System.IO.Pipelines 9.0.x -> 10.0.7 - Microsoft.Extensions.Diagnostics.ResourceMonitoring 9.10.0 -> 10.5.0 - System.Linq.Async 6.0.3 -> 7.0.0 (Netcap) - ContainerBaseImage tags aspnet/runtime:9.0(-distroless) -> 10.0 - Dockerfile: dotnet/aspnet:9.0 + dotnet/sdk:9.0 -> 10.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove NU1510-flagged PackageReferences now covered by the shared framework (System.Text.Json, System.Net.Http, System.IO.Pipelines, System.Private.Uri, System.IO.FileSystem, System.Net.Primitives, System.Text.RegularExpressions, System.Security.Cryptography.X509Certificates, Microsoft.CSharp). - Bump OpenTelemetry packages 1.14.0 -> 1.15.x to address NU1902 CVE advisories (GHSA-g94r-2vxg-569j, GHSA-4625-4j76-fww9, GHSA-mr8r-92fq-pj8p, GHSA-q834-8qmm-v933). - Drop deprecated IncludeOpenAPIAnalyzers from common.props (ASPDEPR007). - Migrate System.Linq.Async SelectAwait usage in SimulatorNodesTests to the new built-in AsyncEnumerable.Select(value, CancellationToken) overload (resolves CS0618). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- GitHub Actions setup-dotnet pinned 9.0.x -> 10.0.x in dotnet.yml, test.yml, codeql.yml - Update OPC Publisher feature matrix to list .net 10 instead of .net 9 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update tools/e2etesting/steps/runtests.yml UseDotNet@2 from 8.0.x to 10.0.x to match the migrated TargetFramework. The IIoTPlatform-E2E-Tests slnx (e2e-tests/IIoTPlatform-E2E-Tests.slnx) and its three projects (OpcUa.Publisher.Models, OpcUa.Publisher.Sdk, OpcPublisher-AE-E2E-Tests) already build cleanly on net10.0; nbgv 3.9.50 rolls forward from net8.0 to .NET 10 at runtime via rollForwardOnNoCandidateFx=Major. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nbgv 3.9.50 (Nerdbank.GitVersioning tool) only ships net8.0 binaries.
Although its runtimeconfig sets rollForwardOnNoCandidateFx=Major so it
would roll forward to .NET 10, explicitly installing the .NET 8 runtime
alongside .NET 10 is more robust and avoids surprises across hosted-
agent images.
- .github/workflows/{dotnet,test,codeql}.yml: setup-dotnet now installs
both 8.0.x and 10.0.x. The last entry (10.0.x) becomes the default.
- tools/e2etesting/steps/runtests.yml: add a second UseDotNet@2 task
installing 8.0.x before the 10.0.x task.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
koepalex
previously approved these changes
May 12, 2026
- Add 60-minute job timeout (ubuntu completes in ~15min; windows had hung indefinitely on the Test step in PR #2444 run, suggesting a cross-process test fixture deadlock that only manifests on Windows). - Add --blame-hang-timeout 10m so any hanging test surfaces a clear failure with the offending test name instead of hanging the runner. - Add concurrency group with cancel-in-progress so superseded PR runs are stopped automatically. - fail-fast: false so the ubuntu signal isn't lost if windows fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Industrial-IoT.slnx contains four test projects. dotnet test on the slnx runs them as multiple parallel test-host processes. On Windows runners, the OPC UA test fixtures (BaseServerFixture spins up real OPC UA servers on random ports with per-process PKI stores) intermittently contend on ports / PKI directories, leading to test-host process crashes (Reason: 'Test host process crashed' / MSB4181 from VSTestTask). ubuntu-latest does not exhibit the issue. Run each test project sequentially in the same step. Each invocation keeps the per-project parallelism (xUnit collection parallelism) but avoids cross-project process contention. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate to .NET 10
Migrates the repository from .NET 9 to .NET 10. Build is clean (0 errors), all 4 in-slnx test projects pass on both Linux and Windows CI, plus all 23 out-of-slnx projects (e2e-tests + 22 samples + Netcap) build clean.
Highlights
net9.0→net10.0across all 36.csprojfiles (src/, tests, e2e-tests, samples/Http|IoTHub|Mqtt|Netcap, tools).lib/net10.0/).aspnet/runtime:9.0(-azurelinux3.0-distroless)→ 10.0 equivalents.samples/Netcap/src/Dockerfile):dotnet/aspnet:9.0+dotnet/sdk:9.0→ 10.0.CI
nbgvglobal tool which still ships onlynet8.0..github/workflows/test.ymlhardened:concurrencygroup withcancel-in-progressso superseded PR runs are aborted automatically.--blame-hang-timeout 10m --blame-hang-dump-type noneto surface hung tests instead of letting them run for hours.fail-fast: falseso a Windows failure no longer cancels the Linux signal.dotnet teston the slnx caused intermittent test-host crashes due to concurrent OPC UA servers/PKI directories fromBaseServerFixture).tools/e2etesting/steps/runtests.yml: bumped from .NET 8 to .NET 10 (with .NET 8 still installed for nbgv)..NET 10 source / behavior fix-ups
<PackageReference>entries flagged by NU1510 as already provided by the shared framework:System.Text.Json,System.Net.Http,System.IO.Pipelines,System.Private.Uri,System.IO.FileSystem,System.Net.Primitives,System.Text.RegularExpressions,System.Security.Cryptography.X509Certificates,Microsoft.CSharp.IncludeOpenAPIAnalyzersproperty incommon.props(ASPDEPR007).SelectAwaitinSimulatorNodesTeststo the new built-inAsyncEnumerable.Select(value, CancellationToken)overload (replaces the now-obsolete communitySystem.Linq.AsyncAPI).docs/opc-publisher/features.mdfeature matrix from.net 9to.net 10.Verification
dotnet restore Industrial-IoT.slnx— clean, no NU1510/NU1902 warnings.dotnet build Industrial-IoT.slnx— 0 errors, 89 pre-existing CA-analyzer warnings.All 23 out-of-slnx projects build cleanly individually.
dotnet build e2e-tests/IIoTPlatform-E2E-Tests.slnx— clean.Tests (4 in-slnx test projects):
Commits
0a1a117— Prepare for .NET 10: drop internal NuGet feed and bump rc version1de20b1— Update TargetFramework from net9.0 to net10.02ca4de9— Bump packages and container base images for .NET 104e5c9da— Resolve .NET 10 migration warningse2ce578— Bump CI workflows and docs to .NET 10b58e630— Bump e2e-testing pipeline SDK to .NET 10962f4ff— Install both .NET 8 and .NET 10 SDKs in CI pipelines8c6a277— Add timeout, hang-detection, and concurrency to Build and Test workflow189c619— Run test projects serially to avoid Windows OPC UA contention