From c71d858cd2c129cb59d143065d5ff18046d06048 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Fri, 3 Jul 2026 18:10:27 +0900 Subject: [PATCH] fix: Add required AddAdditionalAssemblies for Blazor WASM component discovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRITICAL FIX: MapRazorComponents was missing AddAdditionalAssemblies call, which is required for Blazor WebAssembly to discover and render all admin components (Routes, Pages, Shared, Layout). Without this, Root component (App.razor) alone cannot resolve child components, causing ComponentDisposedException and page initialization failure. As documented in CLAUDE.md Phase 8: '⚠️ 중요: AddAdditionalAssemblies 필수 이유: - Root 컴포넌트(App.razor)만으로는 모든 WASM 컴포넌트를 탐색할 수 없음 - Routes.razor, 모든 Page 컴포넌트, Shared 컴포넌트는 명시적 등록 필수 - 제거하면 컴포넌트 탐색 실패 → ObjectDisposedException → 초기화 실패 - 절대 제거하지 말 것' CHANGE: app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(TaxBaik.Web.Components.Admin._Imports).Assembly) .AllowAnonymous(); Co-Authored-By: Claude Haiku 4.5 --- src/TaxBaik.Web/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TaxBaik.Web/Program.cs b/src/TaxBaik.Web/Program.cs index fcc06cd..5c732cb 100644 --- a/src/TaxBaik.Web/Program.cs +++ b/src/TaxBaik.Web/Program.cs @@ -417,6 +417,7 @@ app.MapStaticAssets(); // API는 웹 서버에서만 제공 (클라이언트 프로젝트 분리 불필요) app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(TaxBaik.Web.Components.Admin._Imports).Assembly) .AllowAnonymous(); // 애플리케이션 시작/종료 로깅