本文介绍了Visual Studio 2012 Xaml设计编辑器版本11.0.50727.1 RTMREL中的崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


尝试在Xaml编辑器中查看用户控件时出现以下错误 - 任何想法?


System.NullReferenceException


对象引用未设置为对象的实例。





  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall call,WaitHandle timeoutSignal)  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action
action,Int32 targetApartmentId,WaitHandle aborted,WaitHandle timeoutSignal)  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action,Int32 targetApartmentId,WaitHandle aborted,CallSynchronizationMode syncMode,
WaitHandle timeoutSignal)  在Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut [TValue](RemoteHandle`1 targetObject,Action action,CallSynchronizationMode syncMode)  在Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut [TResult,TValue](RemoteHandle`1
targetObject,Func`2 func,CallSynchronizationMode syncMode)  在Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem项目,IHostTextEditor编辑器,RemoteCancellationToken remoteCancelToken)  
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService。<> c__DisplayClass12。< Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner> b__11(RemoteCancellationToken remoteToken)  在Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation [TResult](CancellationToken
cancelToken,Func`2 func)  在Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item,IHostTextEditor editor,CancellationToken cancelToken)  
at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)





System.NullReferenceException


对象引用未设置为对象的实例。





服务器堆栈跟踪:   在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall call,WaitHandle timeoutSignal)  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action
action,Int32 targetApartmentId)  在Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject,Action action)  在Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn [TResult](IRemoteObject
targetObject,Func`1 func)  在Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem,IRemoteHostTextEditor
remoteEditor,IRemoteCancellationToken remoteToken)  在System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md,Object [] args,Object server,Object []& outArgs)  在System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg)在[0]处重新抛出异常:   在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)  在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)  
at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem,IRemoteHostTextEditor remoteEditor,IRemoteCancellationToken cancelToken)  在Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService。<> c__DisplayClass8。< CreateDesignerImpl> b__6(IRemoteDesignerService
d)  在Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler。<> c__DisplayClass4`2。< MarshalOut> b__3()  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()





System.NullReferenceException


对象引用未设置为对象的实例。





  在Microsoft.Expression.DesignModel.Metadata.MetadataStore.GetTypeConverter(类型类型)  在Microsoft.Expression.WpfPlatform.WpfDesignTimeProperties.RegisterProperty(IPropertyId neutralPropertyKey,IType declaringType,
FrameworkPropertyMetadataOptions options,PropertyChangedCallback callback)  在Microsoft.Expression.WpfPlatform.WpfCommonDesignTimeProperties.Initialize(WpfDesignTimeProperties designTimeProperties)  在Microsoft.Expression.WpfPlatform.WpfDesignTimeProperties..ctor(PlatformMetadataBase
platformMetadata)  在Microsoft.Expression.WpfPlatform.WpfPlatformMetadata.OnInitialize()  在Microsoft.Expression.WpfPlatform.WpfPlatform.Initialize()  在Microsoft.Expression.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver
referenceAssemblyResolver)  在Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()  在Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject
项目,IPlatform平台,布尔创建)  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager。< GetReferencedProjects> d__d.MoveNext()  在Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectMetadata.GetAssemblyForTypeResolve(String
assemblyName)  在Microsoft.Expression.DesignModel.Metadata.TypeResolver.GetType(ClrNamespaceIdentifier clrNamespaceIdentifier,String typeName)  在Microsoft.Expression.DesignModel.Metadata.TypeResolver.ResolveType(ITypeId typeId)  
at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.ResolveType(ITypeResolver typeResolver,ITypeId typeId)  在Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.RegisterDataGridAttributeTable(ITypeResolver
typeResolver)  在Microsoft.Expression.WpfPlatform.WpfPlatform.RefreshProjectSpecificMetadata(ITypeResolver typeResolver,ITypeMetadataFactory typeMetadataFactory)  在Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()  
at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject项目,IPlatform平台,布尔创建)  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager。< GetReferencedProjects> d__d.MoveNext()  
at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectMetadata.GetAssemblyForTypeResolve(String assemblyName)  在Microsoft.Expression.DesignModel.Metadata.TypeResolver.GetType(ClrNamespaceIdentifier clrNamespaceIdentifier,
String typeName)  在Microsoft.Expression.DesignModel.Metadata.TypeResolver.ResolveType(ITypeId typeId)  在Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.ResolveType(ITypeResolver typeResolver,ITypeId typeId)  
at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.RegisterDataGridAttributeTable(ITypeResolver typeResolver)  在Microsoft.Expression.WpfPlatform.WpfPlatform.RefreshProjectSpecificMetadata(ITypeResolver typeResolver,
ITypeMetadataFactory typeMetadataFactory)  在Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()  在Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject
项目,IPlatform平台,布尔创建)  在Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)  在Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem
item,IHostTextEditor editor,CancellationToken cancelToken)  在Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService。<> c__DisplayClass10。<> c__DisplayClass12。< Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner> b__f(CancellationToken
cancelToken) &NBSP;&NBSP;在Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation [TResult](IRemoteCancellationToken remoteToken,Func`2 func)  在Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService。<> c__DisplayClass10。< Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner> b__e()  
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler。<> c__DisplayClass16`1。< MarshalIn> b__15()  在Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()


解决方案

I get the following error when trying to view a User Control in the Xaml Editor - any ideas?

System.NullReferenceException

Object reference not set to an instance of an object.


   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)   at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)


System.NullReferenceException

Object reference not set to an instance of an object.


Server stack trace:    at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)   at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)   at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()


System.NullReferenceException

Object reference not set to an instance of an object.


   at Microsoft.Expression.DesignModel.Metadata.MetadataStore.GetTypeConverter(Type type)   at Microsoft.Expression.WpfPlatform.WpfDesignTimeProperties.RegisterProperty(IPropertyId neutralPropertyKey, IType declaringType, FrameworkPropertyMetadataOptions options, PropertyChangedCallback callback)   at Microsoft.Expression.WpfPlatform.WpfCommonDesignTimeProperties.Initialize(WpfDesignTimeProperties designTimeProperties)   at Microsoft.Expression.WpfPlatform.WpfDesignTimeProperties..ctor(PlatformMetadataBase platformMetadata)   at Microsoft.Expression.WpfPlatform.WpfPlatformMetadata.OnInitialize()   at Microsoft.Expression.WpfPlatform.WpfPlatform.Initialize()   at Microsoft.Expression.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver referenceAssemblyResolver)   at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()   at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.<GetReferencedProjects>d__d.MoveNext()   at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectMetadata.GetAssemblyForTypeResolve(String assemblyName)   at Microsoft.Expression.DesignModel.Metadata.TypeResolver.GetType(ClrNamespaceIdentifier clrNamespaceIdentifier, String typeName)   at Microsoft.Expression.DesignModel.Metadata.TypeResolver.ResolveType(ITypeId typeId)   at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.ResolveType(ITypeResolver typeResolver, ITypeId typeId)   at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.RegisterDataGridAttributeTable(ITypeResolver typeResolver)   at Microsoft.Expression.WpfPlatform.WpfPlatform.RefreshProjectSpecificMetadata(ITypeResolver typeResolver, ITypeMetadataFactory typeMetadataFactory)   at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()   at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.<GetReferencedProjects>d__d.MoveNext()   at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectMetadata.GetAssemblyForTypeResolve(String assemblyName)   at Microsoft.Expression.DesignModel.Metadata.TypeResolver.GetType(ClrNamespaceIdentifier clrNamespaceIdentifier, String typeName)   at Microsoft.Expression.DesignModel.Metadata.TypeResolver.ResolveType(ITypeId typeId)   at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.ResolveType(ITypeResolver typeResolver, ITypeId typeId)   at Microsoft.Expression.DesignModel.Metadata.ProjectNeutralTypesAttributeTable.RegisterDataGridAttributeTable(ITypeResolver typeResolver)   at Microsoft.Expression.WpfPlatform.WpfPlatform.RefreshProjectSpecificMetadata(ITypeResolver typeResolver, ITypeMetadataFactory typeMetadataFactory)   at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()   at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)   at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)   at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)   at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)   at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)   at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()   at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()   at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

解决方案


这篇关于Visual Studio 2012 Xaml设计编辑器版本11.0.50727.1 RTMREL中的崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 01:54