MudBlazorLinter 9.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MudBlazorLinter --version 9.0.0
                    
NuGet\Install-Package MudBlazorLinter -Version 9.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MudBlazorLinter" Version="9.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MudBlazorLinter" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MudBlazorLinter">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MudBlazorLinter --version 9.0.0
                    
#r "nuget: MudBlazorLinter, 9.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MudBlazorLinter@9.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MudBlazorLinter&version=9.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MudBlazorLinter&version=9.0.0
                    
Install as a Cake Tool

MudBlazorLinter

A Roslyn analyzer for MudBlazor components to enforce best practices and detect common issues.

Compatibility

This analyzer is compatible with:

  • .NET 8.0 and later
  • .NET 9.0 (Standard Term Support)
  • .NET 10.0 (Latest)
  • Visual Studio 2022 and later
  • Visual Studio Code with C# extension
  • JetBrains Rider 2022.3 and later

The analyzer targets netstandard2.0 for maximum compatibility.

Installation

This package is automatically installed as a development dependency and will run during build.

dotnet add package MudBlazorLinter

Rules

MBL001: Missing [Parameter] attribute

Severity: Warning

Detects public properties in Blazor components that should have the [Parameter] attribute.

Example - Before:

public class MyComponent : ComponentBase
{
    public string Value { get; set; }  // ⚠️ Warning MBL001
}

Example - After Fix:

public class MyComponent : ComponentBase
{
    [Parameter]
    public string Value { get; set; }  // ✅ Fixed
}

Configuration

You can configure rule severity in your .editorconfig file:

# Disable MBL001
dotnet_diagnostic.MBL001.severity = none

# Make MBL001 an error
dotnet_diagnostic.MBL001.severity = error

# Make MBL001 a suggestion
dotnet_diagnostic.MBL001.severity = suggestion

More Information

License

MIT

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0 437 11/18/2025
9.0.0 421 11/18/2025
8.0.0 418 11/18/2025

v10.0.0: Initial release with MudBlazor CSS utility linting support. Detects inline styles in Razor files and suggests MudBlazor utility classes. Includes MBL001-MBL004 diagnostics with automatic code fixes.