Skip to content

Comments

feat: Make net11 available#1807

Open
linkdotnet wants to merge 1 commit intomainfrom
feat/net11
Open

feat: Make net11 available#1807
linkdotnet wants to merge 1 commit intomainfrom
feat/net11

Conversation

@linkdotnet
Copy link
Collaborator

This PR enables net11.0 and fixes some issues related to the new SDK version.
Also I made net10.0 the default for the bunit.template.

<PackageReference Include="Serilog.Extensions.Logging" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '11.0'))">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The whole SignoutManager type was removed, so I excluded the whole razor file. Also that is why we have quite the #ifdefs in our code for that.

with:
dotnet-version: |
9.0.x
10.0.x
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bumped our templates default from net9 to net10

Copy link

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 adds support for .NET 11.0 to the bUnit testing library. The changes ensure bUnit can target and build against the .NET 11.0 framework, which includes handling breaking changes in ASP.NET Core where SignOutSessionStateManager was removed. The PR also updates the default target framework for the bUnit template from .NET 9.0 to .NET 10.0.

Changes:

  • Added net11.0 as a target framework across all library and test projects
  • Added conditional compilation to exclude obsolete SignOutSessionStateManager code for .NET 11+
  • Updated package dependencies with .NET 11.0 preview versions
  • Updated CI/CD workflows to install and test against .NET 11.0
  • Changed default template target from net9.0 to net10.0

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/bunit/bunit.csproj Added net11.0 to TargetFrameworks
src/bunit.web.query/bunit.web.query.csproj Added net11.0 to TargetFrameworks
src/bunit/TestDoubles/NavigationManager/BunitSignOutSessionStateManager.cs Wrapped class in #if !NET11_0_OR_GREATER to exclude from .NET 11+
src/bunit/TestDoubles/Authorization/BunitAuthorizationExtensions.cs Wrapped SignOutSessionStateManager registration in conditional compilation
tests/bunit.tests/bunit.tests.csproj Added net11.0 to TargetFrameworks
tests/bunit.web.query.tests/bunit.web.query.tests.csproj Added net11.0 to TargetFrameworks
tests/bunit.generators.tests/bunit.generators.tests.csproj Added net11.0 to TargetFrameworks
tests/bunit.testassets/bunit.testassets.csproj Added net11.0 to TargetFrameworks and excluded SignOutSessionManagerLoginDisplay.razor for .NET 11+
tests/bunit.tests/TestDoubles/BunitSignOutSessionStateManagerTest.cs Wrapped test class in #if !NET11_0_OR_GREATER
tests/bunit.testassets/BlazorE2E/ElementRefComponent.razor Changed InvokeAsync<object> to InvokeVoidAsync (best practice improvement)
docs/samples/components/bunit.docs.samples.csproj Added net11.0 to TargetFrameworks
docs/samples/tests/Directory.Build.props Added net11.0 to TargetFrameworks
Directory.Packages.props Added package version mappings for .NET 11.0 preview packages
src/bunit.template/template/.template.config/template.json Changed default from net9.0 to net10.0, added net11.0 choice
.github/workflows/ci.yml Added 11.0.x dotnet version to build/test jobs and updated template test job default
.github/workflows/release.yml Added 11.0.x dotnet version
.github/workflows/docs-deploy.yml Added 11.0.x dotnet version
CHANGELOG.md Added entry documenting net11.0 support
.editorconfig Added BL0010 diagnostic suppression for Blazor analyzer rule

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.

1 participant