Kendo UI throwing CS1593: Delegate 'System.Action' does not take 1 arguments
Kendo UI throwing CS1593: Delegate 'System.Action' does not take 1 arguments
这是一段代码,之前可以正常工作,现在不行了。我正在为 MVC 使用 Kendo UI。错误是
CS1593: Delegate 'System.Action' does not take 1 arguments.
这是一个较旧的站点;打开 运行 显示工作版本为 VS2010,我确实更新了 Kendo 和 MVC,但不是在这个项目中。有什么想法吗?
@(Html.Kendo().Window()
.Name("Window")
.Title("Results")
.Content(@<text><div class="Result"></div></text>).Draggable()
.Resizable()
.Visible(false)
.Width(450)
.Actions(actions => actions.Minimize().Maximize().Close())
)
我找到了答案。
我已经从 MVC3 更新到 MVC4
此更新将破坏 3 方控制
请阅读发行说明的这一部分
http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815
部分:安装 ASP.NET MVC 4 中断 ASP.NET MVC 3 RTM 应用程序。
本节中的第 3 项是所有不存在的内容。一旦更正,一切正常。
如果这对其他人有用,我发现
CS1593: Delegate 'System.Action' does not take 1 arguments.
对于传递给 Content
方法的函数中的错误, 可能有点 'catch all'。
在我的例子中,我使用的是 Kendo.Mvc.UI.Fluent.SplitterPanBuilder
(方法签名为 public SplitterPaneBuilder Content(Func<object, object> content);
),错误来自于我更改了使用的 class 的命名空间,并且没更新。
为了更好地说明这一点,这里有一些(伪)代码导致了错误
verticalPanes.Add()
.Content
(
@<div class="pane-content" id=@panelName>
@(Html.Kendo().Grid<OldInvalidNameSpace.Person>().Name(reportGridName))
</div>
)
并更改为:
verticalPanes.Add()
.Content
(
@<div class="pane-content" id=@panelName>
@(Html.Kendo().Grid<NewValidNameSpace.Person>().Name(reportGridName))
</div>
)
已解决。
在我看来,这个错误确实有助于查明原因,但也许知道这一点会对其他人有所帮助!
对我来说,问题是我在 Content()
中使用了模型中不存在的模型项。这也触发了 CS1593 错误。
这是一段代码,之前可以正常工作,现在不行了。我正在为 MVC 使用 Kendo UI。错误是
CS1593: Delegate 'System.Action' does not take 1 arguments.
这是一个较旧的站点;打开 运行 显示工作版本为 VS2010,我确实更新了 Kendo 和 MVC,但不是在这个项目中。有什么想法吗?
@(Html.Kendo().Window()
.Name("Window")
.Title("Results")
.Content(@<text><div class="Result"></div></text>).Draggable()
.Resizable()
.Visible(false)
.Width(450)
.Actions(actions => actions.Minimize().Maximize().Close())
)
我找到了答案。 我已经从 MVC3 更新到 MVC4 此更新将破坏 3 方控制
请阅读发行说明的这一部分 http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815
部分:安装 ASP.NET MVC 4 中断 ASP.NET MVC 3 RTM 应用程序。
本节中的第 3 项是所有不存在的内容。一旦更正,一切正常。
如果这对其他人有用,我发现
对于传递给CS1593: Delegate 'System.Action' does not take 1 arguments.
Content
方法的函数中的错误,可能有点 'catch all'。
在我的例子中,我使用的是 Kendo.Mvc.UI.Fluent.SplitterPanBuilder
(方法签名为 public SplitterPaneBuilder Content(Func<object, object> content);
),错误来自于我更改了使用的 class 的命名空间,并且没更新。
为了更好地说明这一点,这里有一些(伪)代码导致了错误
verticalPanes.Add()
.Content
(
@<div class="pane-content" id=@panelName>
@(Html.Kendo().Grid<OldInvalidNameSpace.Person>().Name(reportGridName))
</div>
)
并更改为:
verticalPanes.Add()
.Content
(
@<div class="pane-content" id=@panelName>
@(Html.Kendo().Grid<NewValidNameSpace.Person>().Name(reportGridName))
</div>
)
已解决。
在我看来,这个错误确实有助于查明原因,但也许知道这一点会对其他人有所帮助!
对我来说,问题是我在 Content()
中使用了模型中不存在的模型项。这也触发了 CS1593 错误。