I am using the 2018.1.221 Kendo UI for .Net Core. It is a ASP MVC Core app using .net core 2.
This is a grid with Ajax source - the part having issues is here:
.DataSource(dataSource => dataSource
.Ajax()
.Aggregates(a =>
{
a.Add(l => l.Balance).Sum();
})
.Read(read => read.Action("Balances_Read", "Balances").Data("getAccountType"))
.PageSize(250)
)
This works fine on my development machine (and on a different site hosted on Azure) but on this particular app service I get this exception. The exception goes away if I remove the aggregates code. Here is the stack trace upstream from my call:
System.Exception: Unable to build typeDynamicClass3
at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.EmitType(String typeName, CSharpCompilation compilation)
at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.GetDynamicClass(IEnumerable`1 properties)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionNewExpression(IEnumerable`1 propertyValuesExpressions)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.QueryableAggregatesExpressionBuilder.<CreateMemberBindings>d__3.MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at System.Dynamic.Utils.CollectionExtensions.ToReadOnly[T](IEnumerable`1 enumerable)
at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
at Kendo.Mvc.Extensions.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions)
at Kendo.Mvc.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState, Func`2 selector)
at Bryt.Client.Web.Controllers.BalancesController.Balances_Read(DataSourceRequest request, Int32 accountType) in C:\DataDrive\Working\Bryt\Bryt.Client.Web\Controllers\BalancesController.cs:line 65
Again, oddly, this is isolated to running on Azure.
Thanks,
Brian