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中设计器 无法加载,错误提示如上!
有知道的童鞋请 告知下原因哈~。谢啦
关于作者:大同码农
版权声明:本博客所有文章仅用于学习和交流目的,欢迎转载,转载请注明原文作者及出处。
博主的文章没有高度、深度和广度,只是凑字数。由于博主的水平不高,不足和错误之处在所难免,希望大家能够批评指出。
博主是利用读书、参考、引用、抄袭、复制和粘贴等多种方式打造成自己的文章,请原谅博主成为一个无耻的文档搬运工!
声援博主:如果您觉得文章对您有帮助,请点击文章末尾的【关注我】吧!
别忘记点击文章右下角的【推荐】支持一波。~~~///(^v^)\\\~~~ .
👇👇👇我话讲完,谁赞成谁反对。b( ̄▽ ̄)d .-------------------------------------------------👍👍👍