Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Chart > Adding RadChart in Visual Studio Designer

Not answered Adding RadChart in Visual Studio Designer

Feed from this thread
  • Ali Rafiee avatar

    Posted on Jan 9, 2012 (permalink)

    Hi,

    I'm using Silverlight 4, with the latest Silverlight Telerik library.

    When I try to add RadCharts to a UserControl in Visual Studio I get the following error:

     [Line: 0 Position: 0]

    "Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type, System.Object)'."

    I can successfully add them in Blend.
    If I add one in Blend, and then view the UserControl in Visual Studio everything is fine. But if I add more than one to the UserControl and try to view it in Visual Studio I get the this error when I open the xaml file:

    MissingMethodException was thrown on "RadChart": [Line: 0 Position: 0]Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type, System.Object)'. at System.Dynamic.Utils.TypeExtensions.CreateDelegate(MethodInfo methodInfo, Type delegateType, Object target) at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate() at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) at Telerik.Windows.Controls.Charting.DataBindingHelper.CreateExpressionGetter(Type itemType, String propertyName) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\Data\DataBindingHelper.cs:line 716 at Telerik.Windows.Controls.Charting.DataBindingHelper.RecreateExpressionGetters(IEnumerable`1 descriptors) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\Data\DataBindingHelper.cs:line 645 at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\Data\DataBindingHelper.cs:line 64 at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 1335 at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 1305 at Telerik.Windows.Controls.RadChart.Rebind(Object originalData) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 918 at Telerik.Windows.Controls.RadChart.ItemsSourcePropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 1030 at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Core\Controls\Common\System.Windows\PropertyMetadata.cs:line 262 at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter) at Telerik.Windows.Controls.RadChart.set_ItemsSource(Object value) in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 499 at Telerik.Windows.Controls.RadChart.InitializeDesignTimeData() in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 1409 at Telerik.Windows.Controls.RadChart.OnApplyTemplate() in c:\Builds\135\WPF_Scrum\Release_SL\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 807 at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)

     

     

     

    Am I doing something wrong?  I don't remember this happening before.

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Jan 12, 2012 (permalink)

    Hello Ali,

    Have you installed Silverlight 5 recently? We were able to reproduce similar problematic design-time behavior in our local tests, however, we believe it is related to the Microsoft Silverlight 5 framework itself as reported here and here

    Unfortunately, for the time being we cannot suggest you a viable workaround though you can try the somewhat weird solution suggested on the Microsoft site to install Visual Studio 11 developer preview side-by-side in order to resolve the issue in Visual Studio 2010.


    Regards,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Ali Rafiee avatar

    Posted on Jan 12, 2012 (permalink)

    That's I'll give that a try.

    Reply

  • Davut Davut's avatar

    Posted on Jan 13, 2012 (permalink)

    I'm also following this issue because Telerik's Ribbon Components WYSWYG editors doesnt work even you handle DesignerProperties.IsInDesignTool . So I can't install Silverlight 5 developer .

    http://msdn.microsoft.com/en-us/library/system.reflection.methodinfo_methods%28v=VS.110%29.aspx Have a look for details.
    On When you switch There is a difference there is no such method System.Reflection.MethodInfo.CreateDelegate(System.Type, System.Object) defined on .Net Framework 4.0.
    I Think some silvelight controls such as RadChart need MVVM (Model View View Model) structure. I appriciate it's very well, but manageing Microsofts future plan is hard. I have also other problems on silverlight versions. When I install SL 5 some silverlight features fixed well ok.
    But when I turn back to 4.0 Teleriks component works fine!

    Now I decided to choose Telerik! And I'm removing 5 and installing 4 again. I spent 2 days just for this uncompatibility. Install silverlight, developer ,tools and toolkit uff! When I was a java developer everything was better! Microsoft must solve these compatibility problems. But without SP1..N :)

    Here is my previos post,
    http://www.telerik.com/community/forums/silverlight/general-discussions/data-binding-problems-after-updating-to-blend-4-1-10819-0-sl-5-preview.aspx

    Good Coding Brother!
    Sincerely,

    Reply

  • Davut Davut's avatar

    Posted on Jan 13, 2012 (permalink)

    When you follow the stackTrace I see that problem cause is System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate()
    There must be some changes for CreateDelegate method then catastrophe!

    System.Windows.Controls.ItemsControl.NotifyAllItemsAdded(IntPtr nativeItemsControl)-> at Telerik.Windows.Controls.RadComboBox.OnItemsChanged-->Telerik.Windows.Controls.BindingExpressionHelper-->at at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate()-->
    And Finally -->System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type, System.Object)


    Here is the stackTrace
    System.MissingMethodException
    Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type, System.Object)'.
       at System.Dynamic.Utils.TypeExtensions.CreateDelegate(MethodInfo methodInfo, Type delegateType, Object target)
       at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate()
       at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator)
       at Telerik.Windows.Controls.BindingExpressionHelper.CreateGetValueFunc(Type itemType, String propertyPath)
       at Telerik.Windows.Controls.TextSearch.GetPrimaryText(Object item, String primaryTextPath)
       at Telerik.Windows.Controls.RadComboBox.SelectedItemUpdated()
       at Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
       at Telerik.Windows.Controls.Selector.OnSelectionChanged(Object sender, SelectionChangedEventArgs e)
       at Telerik.Windows.Controls.Selector.SelectionChanger`1.InvokeSelectionChangedEvent()
       at Telerik.Windows.Controls.Selector.SelectionChanger`1.End()
       at Telerik.Windows.Controls.Selector.SelectionChanger`1.SelectJustThisItem(T item)
       at Telerik.Windows.Controls.Selector.OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
       at Telerik.Windows.Controls.Selector.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadComboBox.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at System.Windows.Controls.ItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Windows.Controls.ItemCollection.NotifyCollectionReady()
       at System.Windows.Controls.ItemsControl.NotifyAllItemsAdded(IntPtr nativeItemsControl)

    Reply

  • Ali Rafiee avatar

    Posted on Jan 17, 2012 (permalink)

    I was hoping that uninstalling Silverlight 5 SDK would solve the issue but it didn't.
    I guess meanwhile I'll modify that xaml file in Blend.

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Jan 18, 2012 (permalink)

    Hello Davut,

    The changes that cause the exception are caused by Silverlight 5 framework itself and as far as we know the problem is reproducible on x64 machines only. Microsoft is aware of the issue and we hope new Silverlight Tools version will become available to fix this design-time issue.


    Kind regards,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Peter avatar

    Posted on Feb 2, 2012 (permalink)

    I'm having the same issue.  Can anyone confirm that installing Visual Studio 11 Developer Preview corrects the issue? 

    Thanks,

    Reply

  • Scott avatar

    Posted on Feb 5, 2012 (permalink)

    I had the same issue and installing VS 11 Dev Preview did work for me.

    Reply

  • Posted on Feb 27, 2012 (permalink)

    Does anyone know if this bug ever got fixed? I am not installing anything to do with Silverlight5 until I know it's been sorted. I lost two working days trying to sort it out and don't want to go through that again! The annoying thing is that my problems started when I installed the SL5 run time (for the browser, not the dev tools). Some sites, including Telerik's use SL5, so you can't see the online demos without it.

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Mar 1, 2012 (permalink)

    Hello Avrohom,

    As far as we are aware there is no fix from Microsoft on that matter. The only solution that currently works is to install VS 11 Dev Preview (or VS 11 Beta) as the problem is actually related to a number of undisclosed places where Silverlight 5 internally calls upon .NET 4.5 methods that do not exist in .NET 4.0 (and VS 11 installs .NET 4.5). 


    Greetings,
    Giuseppe
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Posted on Mar 1, 2012 (permalink)

    Hello Giuseppe, thanks for the reply.

    This isn't very encouraging. I can't say I'm keen on installing beta software on my development machine. I have VS11 beta on another machine, but that's only for testing and experimenting purposes.

    What's even worse is that your own stuff now requires SL5, so I can't even look at your demos as I don't have the SL5 run time installed.

    However, I'm a bit confused about your reply. If SL5 makes calls to .NET4.5, then that means that it must install .NET4.5 when you install SL5. I don't remember seeing .NET4.5 on my machine when Sl5 was installed. Also, the SL5 download was pretty small if it included a new version of .NET. I don't understand how this can be the problem. If it is, won't installing .NET4.5 on its own sort it out? Why would I need the whole of the VS11 beta?

    Thanks again

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Mar 1, 2012 (permalink)

    Hello Avrohom,

    Silverlight 5 itself (being technology for the Web) does no calls to the full .NET framework but its design-time support (as the one in WPF) does. Also, Silverlight 5 does not install .NET 4.5 and it should not install it -- the problem here is that some Microsoft design-time method calls erroneously rely on .NET 4.5 implementation and resolve properly only when .NET 4.5 is installed (crashing with MissingMethodException on earlier versions of .NET).

    And yes -- you are correct that installing .NET4.5 Beta only is enough to solve the design-time problem, sorry for not explicitly stating this in our previous reply. You can find the download here.


    Kind regards,
    Giuseppe
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Posted on Mar 1, 2012 (permalink)

    Hello,

    Thanks for the clarification. Maybe I'll just install .NET4.5 and see how I go

    Reply

  • Al avatar

    Posted on May 13, 2012 (permalink)

    I am having the same issue. Did anyone find the resolution for this issue? Please help

    Reply

  • Posted on May 13, 2012 (permalink)

    As far as I know, the only resolution is to install .NET4.5, but you should be aware that it's in beta.

    I spent some time researching this last week, and decided against it. One of the main reasons was because 4.5 is not a side-by-side installation, it actually overwrites your installation of .NET 4.0, so you run the risks of existing code breaking. It's hard to tell how widespread the issues are, but there were reports of people having problems.

    I can't risk the amount of time it's likely to take to fix my machine, so I'm holding off. I've wasted enough time with this already. Maybe when 4.5 goes into RTM, I'll install it and try SL5 again.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Chart > Adding RadChart in Visual Studio Designer
Related resources for "Adding RadChart in Visual Studio Designer"

Silverlight Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]