Here is a block of code that was working and now isn't. I am using Kendo UI for MVC. The error is
CS1593: Delegate 'System.Action' does not take 1 arguments.
This was an older site; opening and running shows the working version as VS2010, I did update Kendo and MVC, but not in this project. Any ideas?
@(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())
)
I found the answer. I had updated from MVC3 to MVC4 This update will break 3 party controls
please read this section of release notes http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815
section: Installing ASP.NET MVC 4 breaks ASP.NET MVC 3 RTM applications.
Item 3 in this section was all that wasn't there. Once corrected, everything works fine.
In case this is of use to someone else I found that
is potentially a bit of a 'catch all' for errors in the function passed to the
Content
method.In my case I was using a
Kendo.Mvc.UI.Fluent.SplitterPanBuilder
(which has a method signature ofpublic SplitterPaneBuilder Content(Func<object, object> content);
) and the error came from where I had changed the namespace of a class used and not updated it.To better illustrate this here is some (pseudo-ish) code which caused the error
and changing to this:
resolved it.
In my mind the error does really help pinpoint the cause, but maybe knowing this will help someone else!