Completed
Last Updated: 11 Oct 2019 11:55 by ADMIN
Release 2019.R3.SP.next
محمد
Created on: 02 Oct 2019 08:55
Category: UI for ASP.NET Core
Type: Bug Report
2
ToDataSourceResult raises exception when using Aggregates

Using .Net Core 3.0

ToDataSourceResult raises an exception if the DataSourceRequest has Aggregates

the exception says that there is no constructor with the following signature:

Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions(
	Microsoft.CodeAnalysis.OutputKind, 
	Boolean, 
	String, 
	String, 
	String, 
	Collections.Generic.IEnumerable`1<String>, 
	Microsoft.CodeAnalysis.OptimizationLevel, 
	Boolean, 
	Boolean, 
	String, 
	String, 
	Collections.Immutable.ImmutableArray`1<Byte>, 
	Nullable`1<Boolean>, 
	Microsoft.CodeAnalysis.Platform, 
	Microsoft.CodeAnalysis.ReportDiagnostic, 
	Int32, 
	IEnumerable<KeyValuePair<String,Microsoft.CodeAnalysis.ReportDiagnostic>>, 
	Boolean, 
	Boolean, 
	Microsoft.CodeAnalysis.XmlReferenceResolver, 
	Microsoft.CodeAnalysis.SourceReferenceResolver, 
	Microsoft.CodeAnalysis.MetadataReferenceResolver, 
	Microsoft.CodeAnalysis.AssemblyIdentityComparer, 
	Microsoft.CodeAnalysis.StrongNameProvider, 
	Boolean, 
	Microsoft.CodeAnalysis.MetadataImportOptions, 
	Microsoft.CodeAnalysis.CSharp.NullableContextOptions
)

 

I traced the error down to the method that causes it :

CSharpCompilation CreateCompilation(SyntaxTree syntaxTree)
maybe it needs to use an updated Microsoft.CodeAnalysis.CSharp nuget that supports .Net Core 3.0

 

 

4 comments
ADMIN
Veselin Tsvetanov
Posted on: 04 Oct 2019 14:41

Hello Abu Assar,

I can confirm that the fix implemented in the referred GitHub thread resolves the error observed. Having that said, I will mark this bug report as Completed.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
محمد
Posted on: 04 Oct 2019 04:33

thanks Veselin for your response,

 

I prepared a sample project that demonstrates the issue, and I narrowed down the causes to this package:

<PackageReference Include="Microsoft.CodeAnalysis" Version="3.3.1" />

and unfortunately I need it in my app and can't remove it, I hope you find a fix soon.

Attached Files:
ADMIN
Veselin Tsvetanov
Posted on: 03 Oct 2019 09:11

Hello Abu Assar,

I have tested the ToDataSourceResult() functionality with the implementation from our Grid Aggregates Demo in a .Net Core 3.0 application. The error in question, however, was not present.

May I ask you to prepare and send us a small isolated runnable sample replicating the error observed at your end? Please, remove any external references and database calls and use sample data created on the server. This way we will be able to troubleshoot the problem locally and to provide you with the most appropriate assistance on that case.

Looking forward to hearing from you.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
محمد
Posted on: 02 Oct 2019 12:43
System.MissingMethodException
  HResult=0x80131513
  Message=Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, Boolean, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.CodeAnalysis.OptimizationLevel, Boolean, Boolean, System.String, System.String, System.Collections.Immutable.ImmutableArray`1<Byte>, System.Nullable`1<Boolean>, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32, System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>>, Boolean, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider, Boolean, Microsoft.CodeAnalysis.MetadataImportOptions, Microsoft.CodeAnalysis.CSharp.NullableContextOptions)'.
  Source=Kendo.Mvc
  StackTrace:
   at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.CreateCompilation(SyntaxTree syntaxTree)
   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.Linq.Enumerable.ToArray[TSource](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 Kendo.Mvc.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState)
   at Kendo.Mvc.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request)
   at TestProvider.TestDS(DataSourceRequest request) in Test.cs:line 127
   at TestController.Grid_Read(DataSourceRequest request) in TestController.cs:line 91
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()