BlazorCaptcha 3.0.0
dotnet add package BlazorCaptcha --version 3.0.0
NuGet\Install-Package BlazorCaptcha -Version 3.0.0
<PackageReference Include="BlazorCaptcha" Version="3.0.0" />
<PackageVersion Include="BlazorCaptcha" Version="3.0.0" />
<PackageReference Include="BlazorCaptcha" />
paket add BlazorCaptcha --version 3.0.0
#r "nuget: BlazorCaptcha, 3.0.0"
#:package BlazorCaptcha@3.0.0
#addin nuget:?package=BlazorCaptcha&version=3.0.0
#tool nuget:?package=BlazorCaptcha&version=3.0.0
Blazor-Captcha
Generates a captcha image for a Blazor Server or Webassembly application.
Live demo
Blazor webassembly : <a href="https://tossnet.github.io/Blazor-Captcha/" target="_blank">https://tossnet.github.io/Blazor-Captcha/</a>
⚠️ WebAssembly Demo Currently Broken ⚠️
The live demo on GitHub Pages is currently not working due to a SkiaSharp initialization error:
Uncaught ManagedError: TypeInitialization_Type, SkiaSharp.SKImageInfo
The component works correctly locally (both debug and release), but fails when deployed to GitHub Pages. This issue appeared after version 2.0.2 and persists despite rollback attempts.
🙏 Help Wanted: If you have experience with SkiaSharp + Blazor WebAssembly deployment issues and find a solution, please open an issue using our template or submit a PR - it would be greatly appreciated!
Related discussion: https://github.com/mono/SkiaSharp/discussions/3185
Installation
To Install
Install-Package BlazorCaptcha
or
dotnet add package BlazorCaptcha
For client-side and server-side Blazor - add script section to _Host.cshtml (head section)
<link href="_content/BlazorCaptcha/captcha.css" rel="stylesheet" />
Usage
@page "/"
@using BlazorCaptcha
<h3>Hello, world!</h3>
<Captcha @bind-CaptchaWord="@Captcha" CharNumber="@CaptchaLetters" />
<p>@Captcha</p>
@code{
private string Captcha = "";
private int CaptchaLetters = 5;
protected override Task OnInitializedAsync()
{
Captcha = BlazorCaptcha.Commun.Tools.GetCaptchaWord(CaptchaLetters);
return base.OnInitializedAsync();
}
}
<a name="ReleaseNotes"></a>Release Notes
<details open="open"><summary>Version 2.1.2</summary>
- Fix NuGet packaging:
BlazorCaptcha.Communis now embedded directly (no separate package dependency)- Resolves error
NU1101: Unable to find package BlazorCaptcha.Commun</details>
<details><summary>Version 2.1.0</summary>
- Add .NET 10 support
- Code optimization
- Captcha improvement
- Change license to MIT </details>
<details><summary>Version 2.0.0</summary>
- Due to the Skiasharp problem : https://github.com/mono/SkiaSharp/discussions/3185#discussioncomment-12410708,a special component for Blazor WebAssembly has been created. Currently only compatible with .NET 8 for the WASM part
- .NET 7 compatibility removed </details>
<details><summary>Version 1.7.1</summary>
<details><summary>Version 1.6.0</summary>
- issue #12 </details>
<details><summary>Version 1.5.0</summary>
- Add DotNet 8.0 framework target </details>
<details ><summary>Version 1.4.2</summary>
- Update nuget packages </details>
<details><summary>Version 1.4.1</summary>
- To avoid any confusion, remove 'x', 'V', 'v' chars </details>
<details><summary>Version 1.4.0</summary>
- issue #10 Characters did not always fit inside the div
- remove 'X' and '+' chars </details>
<details><summary>Version 1.3.0</summary>
- migrate to .NET 7 </details>
<details><summary>Version 1.2.4</summary>
- minor improvement </details>
<details><summary>Version 1.2.3</summary>
- Add type="button" </details>
<details><summary>Version 1.2.2</summary>
- add nuget package SkiaSharp.NativeAssets.Linux </details>
<details><summary>Version 1.2.0</summary>
- NET6, removal of the bootstrap class </details>
⚠️ Breaking changes ⚠️
<details><summary>Version 1.0.1 to 1.1.0</summary>
- Change the parameter "CaptchaWord" ⇒ "@bind-CaptchaWord"
- Add the parameter with the length of the word ex : "CharNumber="@CaptchaLetters"
- Remove the "OnRefresh" parameter </details>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.AspNetCore.Components (>= 10.0.3)
- Microsoft.AspNetCore.Components.Web (>= 10.0.3)
- SkiaSharp (>= 3.119.2)
- SkiaSharp.NativeAssets.Linux (>= 3.119.2)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 3.119.2)
-
net9.0
- Microsoft.AspNetCore.Components (>= 9.0.13)
- Microsoft.AspNetCore.Components.Web (>= 9.0.13)
- SkiaSharp (>= 3.119.2)
- SkiaSharp.NativeAssets.Linux (>= 3.119.2)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 3.119.2)
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 | |
|---|---|---|---|
| 3.0.0 | 228 | 2/13/2026 | |
| 2.1.2 | 231 | 1/23/2026 | |
| 2.1.1 | 107 | 1/20/2026 | |
| 2.1.0 | 108 | 1/20/2026 | |
| 2.0.2 | 4,260 | 4/8/2025 | |
| 2.0.1 | 355 | 4/7/2025 | |
| 2.0.0 | 293 | 4/5/2025 | |
| 1.7.1 | 2,561 | 12/17/2024 | |
| 1.7.0 | 892 | 11/19/2024 | |
| 1.6.0 | 5,776 | 3/28/2024 | |
| 1.5.0 | 4,443 | 1/27/2024 | |
| 1.4.2 | 1,766 | 11/15/2023 | |
| 1.4.1 | 7,454 | 2/9/2023 | |
| 1.4.0 | 978 | 2/5/2023 | |
| 1.3.0 | 1,871 | 12/2/2022 | |
| 1.2.4 | 6,879 | 8/18/2022 | |
| 1.2.3 | 6,640 | 4/5/2022 | |
| 1.2.2 | 803 | 3/11/2022 | |
| 1.2.1 | 1,454 | 2/17/2022 |
v3.0.0 Remove .NET 8.0 support, update dependencies to .NET 9.0 and .NET 10.0 versions