After upgrading the project from .NET 7 to .NET 8, many MudBlazor components are not functioning as expected. For example, with MudDialog, if I use OnBackdropClick, I encounter this error:
Error: System.InvalidOperationException: Unable to set property 'OnBackdropClick' on object of type 'MudBlazor.MudDialog'. The error was: Unable to cast object of type 'System.Action' to type 'Microsoft.AspNetCore.Components.EventCallback`1[Microsoft.AspNetCore.Components.Web.MouseEventArgs]'. ---> System.InvalidCastException: Unable to cast object of type 'System.Action' to type 'Microsoft.AspNetCore.Components.EventCallback`1[Microsoft.AspNetCore.Components.Web.MouseEventArgs]'. at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action`2 setter, Object target, Object value) at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value) at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target) at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters) at MudBlazor.State.ParameterSet.SetParametersAsync(Func`2 baseSetParametersAsync, ParameterView parameters)I set the interactivity of the component to InteractiveServer, but no chance
<MudDialog @rendermode="RenderMode.InteractiveServer" OnBackdropClick="HandleBackdropClick">I also set the interactivity of:
HeadOutletandRoutesin theApp.razorfileMudThemeProvider,MudDialogProviderandMudSnackbarProviderin theMainLayout.razorfile
This issues on GitHub did not help me resolve the error: