Skip to content

Test .NET 11 Preview 4 on master#7766

Draft
johnsimons wants to merge 5 commits into
masterfrom
dotnet11-preview4
Draft

Test .NET 11 Preview 4 on master#7766
johnsimons wants to merge 5 commits into
masterfrom
dotnet11-preview4

Conversation

@johnsimons
Copy link
Copy Markdown
Member

Update the target framework of all projects to net11.0 and configure the SDK to 11.0.100-preview.4 in global.json. This moves the solution to the .NET 11 preview.

@johnsimons johnsimons force-pushed the dotnet11-preview4 branch 3 times, most recently from 04a1cb7 to 3a24832 Compare May 25, 2026 02:08
@johnsimons johnsimons changed the title Test upgrade to .NET 11 Test .NET 11 Preview 4 on master May 25, 2026
@johnsimons johnsimons force-pushed the dotnet11-preview4 branch from cecfc8c to 0038547 Compare May 25, 2026 22:42
Update all test projects (`NServiceBus.*Tests.csproj`) to target `net11.0`.
This change also updates `global.json` to specify `11.0.100-preview.4.26230.115` SDK and configures the CI workflow to install both `10.0.x` and `11.0.x` .NET SDKs for build compatibility.
@johnsimons johnsimons force-pushed the dotnet11-preview4 branch from 0038547 to 873540b Compare May 26, 2026 21:57

sb.AppendLine();
sb.Append(new string(' ', i * 4));
sb.Append(' ', i * 4);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was getting the following warning:
warning CA1830: Prefer strongly-typed StringBuilder overload (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change seems like it's worth going ahead and getting into master in a separate PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

PR raised - #7775

Otherwise the tests do not work.
Addresses `CS1701` build warnings in the `NServiceBus.Core.Analyzer.Tests.Roslyn5` project. This specific analyzer test project requires a different test SDK version, leading to framework version conflicts during the .NET 11 upgrade.
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