This appears to be a new problem with VS2017 (15.0.0+ 26228.10) and Reporting R1 2017
We have a large project that has worked well with VS2015, but after migration to VS2017 we are seeing the designer crash when we try to open a Value editor (Edit Expression) when the project has a User Function defined.
I tried to add this one user function to the Sample report project downloaded from Telerik (CSharp.ReportLibrary)
public static class OurCompanyFunctions
{
[Function(Category = "Testing", Namespace = "OurCompanyNameSpace", Description = "What will happen?", IsVisible = true, Name = "FunctionName")]
public static string ValueIsNull(object val)
{
return "did it work?";
}
}
I tried to change the "Value" on a Text box by opening the Edit Expression editor.
Here is the Exception in the event log
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
Server stack trace:
at System.Linq.Enumerable.Cast[TResult](IEnumerable source)
at Telerik.Reporting.Design.Common.Utils.AggregateFunctionHelper.GetAggregateFunctions(IServiceProvider provider)
at Telerik.Reporting.Design.Common.ExpressionBuilder.CategoryAdapter.<GetAggregates>d__28.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at Telerik.Reporting.Design.Common.ExpressionBuilder.CategoryAdapter.FillAggregates(Category funcCategory, IServiceProvider provider)
at Telerik.Reporting.Design.Common.ExpressionBuilder.CategoryAdapter.CreateHierarchy(IServiceProvider provider, Boolean isFieldsTreeVisible)
at Telerik.Reporting.Design.Common.ExpressionBuilder.ExpressionBuilderDialog.LoadCategories(IServiceProvider provider)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(System.Runtime.Remoting.Messaging.Message, Boolean)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(System.Object, System.Runtime.Remoting.Proxies.MessageData ByRef)
at Telerik.Reporting.Design.Common.ExpressionBuilder.ExpressionBuilderDialog+LoadCategoriesDelegate.EndInvoke(System.IAsyncResult)
at Telerik.Reporting.Design.Common.ExpressionBuilder.ExpressionBuilderDialog.OnLoadCategoriesComplete(System.IAsyncResult)
at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()