HI
There is a problem after updating to .NET 7
There is no problem in the development environment, but after publishing and deployment on IIS , it thrown an error.
Meanwhile, I use Windows 11 and IIS
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Arg_NoDefCTor, SharedComponents.Shared.MainLayout System.MissingMethodException: Arg_NoDefCTor, SharedComponents.Shared.MainLayout 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 Syncfusion.Blazor.SfComponentActivator.CreateInstance(Type ) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider , Type ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateComponent(Type ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& , 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() blazor.webassembly.js:1:38555
Hi Ali,
Greetings from Syncfusion.
We are unable to replicate the issue. Please delete the bin and obj files from the application then rebuild and publish it. The issue might have occurred due to publishing using Trim. We suggest you to publish without trimming and check the issue. Refer the below links for reference
https://github.com/dotnet/aspnetcore/issues/43738
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-7.0
If the issue still persists, share the below details to validate further at our end
Regards,
Joshna L