更新 blazor 版本 3.0100 后 Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ParseArguments 中的参数出现错误

Getting error in arguments in Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ParseArguments after update blazor version 3.0100

将我的 blazor 项目从 .net preview 7 更新到 .net core 3.0.100 版本后,我在 sycfusion 网格控制中遇到以下错误,我已经通过引用更新了所有最新的 packages.also 更新语法更改从 https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-9/

`blazor.server.js:8 Uncaught (in promise) Error: System.ArgumentException: The call to 'UpdateTemplate' expects '5' parameters, but received '4'. at 
Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ParseArguments(JSRuntime jsRuntime, String methodIdentifier, String arguments, Type[] parameterTypes)
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(JSRuntime jsRuntime, DotNetInvocationInfo& callInfo, IDotNetObjectReference objectReference, String argsJson)
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson)
    at Object.endInvokeDotNetFromJS (blazor.server.js:8)
    at e.<anonymous> (blazor.server.js:8)
    at blazor.server.js:1
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (blazor.server.js:1)
    at e.processIncomingData (blazor.server.js:1)
    at e.connection.onreceive (blazor.server.js:1)
    at WebSocket.i.onmessage (blazor.server.js:1)
endInvokeDotNetFromJS @ blazor.server.js:8
(anonymous) @ blazor.server.js:8
(anonymous) @ blazor.server.js:1
e.invokeClientMethod @ blazor.server.js:1
e.processIncomingData @ blazor.server.js:1
connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1

 <EjsGrid ID="gdProjects" @ref="gdProjects" ModelType="@model" DataSource="@filteredProjects" AllowReordering="true" AllowFiltering="true" AllowPaging="true" AllowMultiSorting="false" AllowSorting="true" AllowExcelExport="true" AllowPdfExport="true" Toolbar="@(new List<string>() { "Search" })">
            <GridFilterSettings Type="@Syncfusion.EJ2.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
            <GridPageSettings PageCount="10" PageSizes="true"></GridPageSettings>
            <GridColumns>
                <GridTemplates>
                    <RowTemplate>
                        @{
                            var project = (context as ProjectTable);
                            <td class="data-cell pointer" @onclick="(()=>OnProjectClick(project.ProjectId))">
                                @project.ProjectName
                            </td>
                            <td class="data-cell pointer" @onclick="(()=>OnClientClick(project.ClientId))">
                                @project.ClientName
                            </td>
                            <td class="data-cell">
                                @project.Status
                            </td>
                            <td class="data-cell">
                                @project.NextStep
                            </td>
                            <td class="data-cell">
                                @project.DueDate
                            </td>
                        }
                    </RowTemplate>
                </GridTemplates>
                <GridColumn Field=@nameof(ProjectTable.ProjectName) HeaderText="Project Name" />
                <GridColumn Field=@nameof(ProjectTable.ClientName) HeaderText="Client Name" />
                <GridColumn Field=@nameof(ProjectTable.Status) HeaderText="Status" />
                <GridColumn Field=@nameof(ProjectTable.NextStep) HeaderText="Next Step" />
                <GridColumn Field=@nameof(ProjectTable.DueDate) HeaderText="Due Date" />
            </GridColumns>
        </EjsGrid>`

我猜 Nuget(Syncusion.EJ2.Blazor) 和 ejs.interop.min.js 文件之间存在版本不匹配。请确保使用相同版本的脚本文件来解决此错误。

例如,如果您使用的是 Nuget v17.3.17,则应从以下 CDN 引用脚本文件。

<script src="https://cdn.syncfusion.com/ej2/17.3.17/dist/ejs.interop.min.js"></script>

参考: https://ej2.syncfusion.com/blazor/documentation/grid/getting-started/