This is a migrated thread and some comments may be shown as answers.

XAML Designer view - Unhandled Exception

1 Answer 138 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Bárbara
Top achievements
Rank 1
Bárbara asked on 13 Nov 2015, 06:29 PM

 

This is urgent since I can't do anything else on my WPF app until this gets figured out! 

I was trying to add a RadCartesianChart on an existing WPF project and I was having the following error message on the designer view(even though it would compile and run normally):

[System.InvalidOperationException
Sequence contains more than one element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.DefineGenericParameters(Type type, MockTypeDefinition mockType)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.PopulateMockType(Type type, MockTypeDefinition mockType)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.DefineType(Type type)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.MockGenericType(Type type)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.DefineType(Type type)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.DefineProperty(TypeDefinition typeDefinition, PropertyInfo propertyInfo)....]

 

I tried a bunch of different things and the error remained, so I decided to create a new WPF project and paste some code from the RadChartView - Getting Started topic on http://docs.telerik.com/ and then I got
[System.NullReferenceException
Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeDefinition.ImplementAbstractEvent(EventDefinition eventDefinition, Boolean shouldOverride, Action`3 emitAddMethodBody, Action`3 emitRemoveMethodBody)
   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.InterfaceEmitterFactory.DefaultInterfaceEmitter.ImplementEvent(EventDefinition eventDefinition, Boolean shouldOverride)...]

I don't know if it helps but I attached an image of what the error looks like on the second case.

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 16 Nov 2015, 03:16 PM
Hello Bárbara,

I tried to reproduce the issue but to no avail. I also created a new project with a sample chart in it but the designer loaded just fine. We have several reports similar to yours related with the 2015 version of Visual Studio. Could you please share some information about your environment? Also, we noticed that most of the issues reported so far are no longer reproducible with the latest Visual Studio Update 1 RC. You could try using it in case this is suitable for you.

Regards,
Peshito
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Bárbara
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or