Trying to use Nustache to share mustache patterns between client and server, but Nustache just doesn't play well with my application. I used the code directly from my example MVC application in the source code, but I get an error every time I try to install or add a view mechanism. Here's a code snippet (from an action method, I also tried to add a view engine globally to global.asax and had the same error):
ViewResult viewResult = View(new { test = "Jawesome" });
viewResult.ViewEngineCollection = new ViewEngineCollection
{
new NustacheViewEngine()
};
And here is the error:
[ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array.]
System.Collections.Generic.List`1.Insert(Int32 index, T item) +62
MyController.Index() in C:\src\projects\myproject\myproject.Web\Controllers\MyController.cs:83
lambda_method(Closure , ControllerBase , Object[] ) +79
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +264
...
source
share