【问题标题】:Abp version updateAbp版本更新
【发布时间】:2023-02-14 18:20:32
【问题描述】:

大家好,我正在尝试将 abp 版本从 5.2.2 更新到 6.0.1

它的单层 Web 应用程序带有 Blazor 服务器。

我执行了 abp update,然后执行了 schema、blazor、npm 和 yarn update,现在当我运行应用程序时,我从浏览器控制台收到此错误消息

rror: System.InvalidOperationException: Unable to set property 'Clicked' on object of type 'Blazorise.BarDropdownItem'. The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback' to type 'Microsoft.AspNetCore.Components.EventCallback`1[Microsoft.AspNetCore.Components.Web.MouseEventArgs]'.
 ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback' 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.PropertySetter.SetValue(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.ParameterView.SetParameterProperties(Object target)
   at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
   at Blazorise.BaseComponent.SetParametersAsync(ParameterView parameters)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)

【问题讨论】:

    标签: abp blazorise


    【解决方案1】:

    在使用 abp cli 创建新项目后,我复制了包版本并且它有效。问题是

    "Blazorise.Bootstrap5" Version="1.0.4" />
    "Blazorise.Icons.FontAwesome" Version="1.0.4" />
    

    这是正确的版本

    【讨论】:

      【解决方案2】:

      请在 Blazor 项目中使用 abp bundle 命令。如果没有,可以查看文档 -> here

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-09-12
        • 1970-01-01
        • 2019-04-10
        • 1970-01-01
        • 1970-01-01
        • 2019-04-11
        • 2018-07-18
        • 2020-04-06
        相关资源
        最近更新 更多