I'm using in my client code message boxes to confirm the user's action and they're working well in debug mode, but in the published bundle not. Stack trace:
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Arg_NoDefCTor, Microsoft.FluentUI.AspNetCore.Components.MessageBox
System.MissingMethodException: Arg_NoDefCTor, Microsoft.FluentUI.AspNetCore.Components.MessageBox
at System.RuntimeType.CreateInstanceMono(Boolean , Boolean )
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean )
at System.Activator.CreateInstance(Type , Boolean , Boolean )
at System.Activator.CreateInstance(Type , Boolean )
at System.Activator.CreateInstance(Type )
at Microsoft.AspNetCore.Components.DefaultComponentActivator.CreateInstance(Type )
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider , Type , IComponentRenderMode , Nullable`1 )
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] , Int32 , Int32 )
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& , Int32 )
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& , Int32 )
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& , Int32 )
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& , Int32 , Int32 , Int32 , Int32 )
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer , RenderBatchBuilder , Int32 , ArrayRange`1 , ArrayRange`1 )
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder , RenderFragment , Exception& )
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry )
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
π» Repro or Code Sample
TemplateConfiguration.razor
@page "/TemplateConfiguration"
@inject IDialogService DialogService
....
@code {
private async Task ShowConfirmationAsync(string filePath)
{
var dialog = await DialogService.ShowConfirmationAsync("Do you confirm the deletion of this template?", "Yes", "No", "Confirmation");
var result = await dialog.Result;
if (!result.Cancelled)
await DeleteTemplateAsync(filePath);
}
}
π Bug Report
I'm using in my client code message boxes to confirm the user's action and they're working well in debug mode, but in the published bundle not. Stack trace:
π» Repro or Code Sample
TemplateConfiguration.razor
MainLayout.razor
Program.cs
π€ Expected Behavior
Message box to be shown.
π― Current Behavior
Stack trace:
π Possible Solution
We have tried to reference
MessageBox
directly, but it doesn't work too.π Your Environment