Blazorise Analyzer

Blazorise Analyzer helps you catch Blazorise 2.0 migration issues directly in your editor and build output.

The analyzer runs as part of normal Roslyn analysis and reports actionable diagnostics for renamed or removed components, parameters, members, types, and host-file script references.

When to Use

Use Blazorise Analyzer when upgrading an existing app, validating shared component libraries, or preventing migration regressions during active development.

  • You are migrating from Blazorise 1.x to 2.0.
  • Your solution has many projects and you need consistent migration checks.
  • You want diagnostics in IDE and CI instead of finding issues only at runtime.

Benefits

  • Detect renamed components, tags, parameters, members, and types.
  • Catch removed APIs and parameter type changes early in the build.
  • Validate TValue shape mismatches before runtime.
  • Identify unsupported static Chart.js references in host files.

Installation

Install package

Choose the stable package for production migrations or the prerelease package when validating preview changes.
dotnet add package Blazorise.Analyzers
Use this package when upgrading to a released Blazorise version.

Project file reference

If you prefer editing the project file directly, add the package reference in the target .csproj.
<PackageReference Include="Blazorise.Analyzers" Version="2.4.0" PrivateAssets="all" />

This has the same effect as dotnet add package Blazorise.Analyzers. Keep PrivateAssets="all" so the analyzer does not flow transitively to downstream consumers.

Recommended workflow

Follow this workflow for predictable, reviewable upgrades.

  1. Install Blazorise.Analyzers into migration-target projects.
  2. Build the solution and review BLZ* diagnostics.
  3. Apply fixes incrementally and commit by logical change groups.
  4. Use the migration CLI for bulk refactoring, then re-run analyzer diagnostics.

Rule IDs

Migration diagnostics

NameType
BLZC001error

Blazorise component renamed.

BLZR001error

Blazorise Razor tag renamed.

BLZP001error

Blazorise parameter renamed.

BLZP002error

Blazorise parameter type changed.

BLZP003error

Blazorise parameter removed.

BLZP004warning

Color.Link usage is restricted to button and alert components.

BLZT001error

Blazorise TValue shape is invalid.

BLZS001error

Blazorise member renamed.

BLZS002error

Blazorise member removed.

BLZTYP001error

Blazorise type renamed.

BLZTYP002error

Blazorise type removed.

BLZJS001error

Static Chart.js script reference is unsupported and must be removed from host files.

Host file checks

Host-file diagnostics scan wwwroot/index.html, Pages/_Host.cshtml, App.razor, and Components/App.razor to catch unsupported static Chart.js references during migration.

Severity in CI

Promote selected diagnostics

Configure severity in .editorconfig when you want stricter CI gating.
dotnet_diagnostic.BLZP004.severity = error
On this page