-
Notifications
You must be signed in to change notification settings - Fork 457
Description
Is your feature request related to a problem? Please describe.
The AdminPanel structure and initialization must be modernized to be able to use new blazor features.
The AdminPanel project and depending web projects need to be migrated to the new way of doing blazor applications. It feels like some new and old features are mixed in the current codebase and it's very confusing to work with it.
The required steps are at: https://learn.microsoft.com/en-us/aspnet/core/migration/80-to-90?view=aspnetcore-8.0&tabs=visual-studio
Describe the solution you'd like
Following the guide, the AdminPanel needs to be adapted, so it's based upon an 'App.razor' file instead of '_Host.cshtml' and '_Layout.cshtml'.
The orchestration of the application must be adapted in the following locations:
MUnique.OpenMU.Web.AdminPanel.WebApplicationExtensionsMUnique.OpenMU.Web.AdminPanel.Host.ProgramMUnique.OpenMU.Web.GameServer.Host.Program
Additional context
To have a clean reference project, start a new project 'Blazor Web App' in Visual Studio 2026.
E.g. new:
using BlazorWebApp.Components;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
app.UseHttpsRedirection();
app.UseAntiforgery();
app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();old:
using BlazorServerApp_Old.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run();