Я получаю следующую ошибку:
Код: Выделить всё
ManagedError: One or more errors occurred. (Cannot provide a value for property 'ToastService' on type 'LiveBingoBlazor.Client.Pages.Host'. There is no registered service of type 'Blazorise.IToastService'.)
Код: Выделить всё
(In (Server-side) Program.cs)
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
builder.Services.AddSignalR();
builder.Services.AddResponseCompression(opts =>
{
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
["application/octet-stream"]);
});
builder.Services.AddSingleton();
builder.Services
.AddBlazorise(options =>
{
options.Immediate = true;
})
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
var app = builder.Build();
Код: Выделить всё
(In App.razor (within the tag))
Код: Выделить всё
(in (both Server and Client side) _imports.razor)
@using Blazorise
Код: Выделить всё
(In Routes.razor (after the component)
Оба Blazorise.Bootstrap5 и Blazorise.Icons.FornAwesome установлены с версией 1.8.8.
Спасибо,
Пэт
Подробнее здесь: https://stackoverflow.com/questions/798 ... sembly-app
Мобильная версия