Skip to content

Add multi-targeting for .NET 8 and .NET 9 (currently net10.0 only) #516

Description

@csharpfritz

Summary

The library currently single-targets net10.0 (BlazorWebFormsComponents.csproj -> <TargetFramework>net10.0</TargetFramework>). Teams migrating from Web Forms may not be on .NET 10 yet -- many are still on .NET 8 (LTS) or .NET 9.

Proposal

Change BlazorWebFormsComponents.csproj to multi-target:

<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>

This would also require:

  • Conditional <PackageReference> versions for Microsoft.AspNetCore.Components (8.0.x / 9.0.x / 10.0.x)
  • A build matrix or CI update to test all three TFMs
  • Verifying any API differences across versions (e.g., IDataProtectionProvider, HttpContext usage in SSR)
  • Updating docs home page to list all supported versions

Context

  • Directory.Build.props sets <AspNetCoreVersion>10.0.0</AspNetCoreVersion> -- would need to become conditional
  • global.json pins SDK to 10.0.100
  • The Analyzers project already targets netstandard2.0 (cross-version compatible)
  • .NET 8 is the current LTS release (supported through November 2026)

Impact

Broadens the audience significantly -- teams on .NET 8 LTS or .NET 9 could adopt BWFC without upgrading their runtime first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions