XAML Designer view - Unhandled Exception

2 posts, 0 answers
  1. Bárbara
    Bárbara avatar
    16 posts
    Member since:
    Nov 2015

    Posted 13 Nov 2015 Link to this post

     

    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.

  2. Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 16 Nov 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top