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)
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
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.
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