none
xaml designer crashed at Metadata.MockTypes

    Question

  • Hi,

    I constantly got this error when using VS2015. I was able to open designer view. But I cannot do too much from this designer view. I changed to build target from 'Any CPU'  to x86, still cannot avoid this crash.

    After some searching, seems VS2015 update 2 has fixed this issue? 

      at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeDefinition.DefineVirtualMethod(MethodDefinition method, Boolean shouldOverride, Nullable`1 additionalAttributes)

       at https://www.devexpress.com/Support/Center/Question/Details/T278012 (Type baseType, 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.DefineAttributeConstructorArgument(CustomAttributeTypedArgument argument)   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.DefineAttributeConstructorArguments(IList`1 constructorArguments)   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.CreateCustomAttributeBuilder(CustomAttributeData attribute, RuntimeTypeDefinition attributeType)   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.CreateCustomAttributeBuilder(CustomAttributeData attribute, RuntimeTypeDefinition attributeType, IMockAttributeTarget mockAttributeTarget)   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockTypes.MockTypeGenerator.CloneCustomAttributes(MemberInfo memberInfo, IMockAttributeTarget mockAttributeTarget)   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.DefineField(TypeDefinition typeDefinition, FieldInfo fieldInfo, DependencyPropertyContext dependencyPropertyContext)   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.MockType(Type type)   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockType.InitializeMockType()   at Microsoft.VisualStudio.DesignTools.XamlDesigner.Metadata.MockType.get_RuntimeType()   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.ProjectContextType.InitializeClass()   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MemberCollection.get_AttachedPropertyIndex()   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MemberCollection.CreateAttachedProperty(String propertyName, MemberKey& key)   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MemberCollection.CreateMember(MemberType memberTypes, String memberName, MemberKey& key)   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MemberCollection.TryGetCachedMember(MemberType memberTypes, String memberName, Boolean create, IMember& member)   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MemberCollection.GetMember(MemberType memberTypes, String memberName, MemberAccessTypes access)   at Microsoft.VisualStudio.DesignTools.Platform.Metadata.ProjectContextType.GetMember(MemberType memberTypes, String memberName, MemberAccessTypes access)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyMerger.GetPropertiesFromSelection(IEnumerable`1 selectedSceneNodes, Boolean includeStatics)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyMerger.GetMergedProperties(IEnumerable`1 selectedSceneNodes, Boolean includeStatics)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.GetPropertiesToShowInternal(IReadOnlyList`1 selectedObjects)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.GetRenderedProperties(IReadOnlyList`1 selectedObjects)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.UpdateOnSelectionChanged(Boolean forceUpdate, Boolean shouldCloseOpenTransactions, Boolean clearAddedProperties)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.UpdateSelectionCore(Boolean forceUpdate, Boolean shouldCloseOpenTransactions, Boolean clearAddedProperties)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.UpdateSelection(Boolean forceUpdate, Boolean shouldCloseOpenTransactions, Boolean clearAddedProperties)   at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.PropertyInspectorModel.PropertyManager_MultiplePropertyReferencesChanged(Object sender, MultiplePropertyReferencesChangedEventArgs args)   at Microsoft.VisualStudio.DesignTools.Designer.Properties.PropertyManager.FireAllPropertyChangedEvents(SceneUpdatePhaseEventArgs args)   at Microsoft.VisualStudio.DesignTools.Designer.Properties.PropertyManager.SelectionManager_LateActiveSceneUpdatePhase(Object sender, SceneUpdatePhaseEventArgs args)   at Microsoft.VisualStudio.DesignTools.Designer.ViewModel.SceneUpdatePhaseEventHandler.Invoke(Object sender, SceneUpdatePhaseEventArgs e)   at Microsoft.VisualStudio.DesignTools.Designer.Selection.SelectionManager.FireLateActiveSceneUpdatePhase(SceneUpdatePhaseEventArgs args)   at Microsoft.VisualStudio.DesignTools.Designer.View.SceneViewUpdateScheduleTask.UpdateLate()   at Microsoft.VisualStudio.DesignTools.Utility.Scheduler.ScheduleTask.Update()   at Microsoft.VisualStudio.DesignTools.Utility.Scheduler.SchedulingService.DispatchTasksAtPriority(DispatcherPriority priority)   at Microsoft.VisualStudio.DesignTools.Utility.Scheduler.SchedulingService.DispatcherToken.Dispatch(Object arg)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.DispatcherOperation.InvokeImpl()   at System

    Any suggestion?

    Thanks


    Maggie

    Tuesday, August 23, 2016 5:26 PM