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 should I use this?

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

Stable package install

Use the stable analyzer package for regular production migration work.
dotnet add package Blazorise.Analyzers

This is the default choice when upgrading to a released Blazorise version.

Prerelease package install

Use prerelease only when validating preview Blazorise changes.
dotnet add package Blazorise.Analyzers --prerelease

Prerelease can include diagnostics for upcoming changes before they are shipped in a stable package.

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.0.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

Name Description Type
BLZC001

Blazorise component renamed.

error
BLZR001

Blazorise Razor tag renamed.

error
BLZP001

Blazorise parameter renamed.

error
BLZP002

Blazorise parameter type changed.

error
BLZP003

Blazorise parameter removed.

error
BLZP004

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

warning
BLZT001

Blazorise TValue shape is invalid.

error
BLZS001

Blazorise member renamed.

error
BLZS002

Blazorise member removed.

error
BLZTYP001

Blazorise type renamed.

error
BLZTYP002

Blazorise type removed.

error
BLZJS001

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

error

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