wp开发之一,第一个异常

最近,用VS2013+WP SDK8.0更新之前编写的一个软件时,遇到一个错误。

System.InvalidCastException
Unable to cast object of type 'System.Windows.Controls.TextBlock' to type 'Microsoft.Expression.Utility.ValueEditors.ChoiceEditor'.
在 Microsoft.Expression.DesignSurface.UserInterface.PlatformPane.PlatformPane.System.Windows.Markup.IComponentConnector.Connect(Int32 connectionId, Object target)
在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetConnectionId(Object root, Int32 connectionId, Object instance)

System.Windows.Markup.XamlParseException
设置 connectionId 时引发了异常。
在 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
在 System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
在 System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
在 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
在 Microsoft.Expression.DesignSurface.UserInterface.PlatformPane.PlatformPane.InitializeComponent()
在 Microsoft.Expression.DesignSurface.UserInterface.PlatformPane.PlatformPane..ctor(IDesignerContext context)
在 Microsoft.Expression.DesignSurface.UserInterface.WindowContext.<.ctor>b__3()
在 Microsoft.Expression.DesignSurface.UserInterface.WindowContext.CreatePane(Border container, Func`1 callback, String identifier)
在 Microsoft.Expression.DesignSurface.UserInterface.WindowContext.GetPaneContainer(String identifier)
在 Microsoft.Expression.DesignSurface.DesignerService.GetPane(String identifier)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass1a.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.GetPane>b__19()
在 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass2a`1.<MarshalIn>b__29()
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessQueue(CallQueue queue)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessInboundAsyncQueue(Int32 identity)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32 msg, IntPtr wParam, IntPtr lParam, Boolean elevatedQuery, Boolean& handled)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 Microsoft.Expression.DesignHost.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
在 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
在 System.Windows.Threading.Dispatcher.Run()
在 System.Windows.Application.RunDispatcher(Object ignore)
在 System.Windows.Application.RunInternal(Window window)
在 System.Windows.Application.Run(Window window)
在 Microsoft.Expression.DesignHost.Isolation.DesignerProcess.RunApplication()
在 Microsoft.Expression.DesignHost.Isolation.DesignerProcess.<>c__DisplayClass2.<Main>b__0()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()

 

 

此问题未找到合理的解决办法,只是用VS2012编辑是正常显示的,但是在2013中设计器 无法加载,错误提示如上!

有知道的童鞋请 告知下原因哈~。谢啦

posted @ 2014-05-14 23:09  大同码农  阅读(806)  评论(0编辑  收藏  举报