2013-02-13 93 views
0

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Microsoft.VisualStudio.PlatformUI.VsToolBar', AncestorLevel='1''. BindingExpression:Path=Orientation; DataItem=null; target element is 'VsMenuItem' (Name=''); target property is 'NoTarget' (type 'Object') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Microsoft.VisualStudio.PlatformUI.VsToolBar', AncestorLevel='1''. BindingExpression:Path=DataContext.DockLocation; DataItem=null; target element is 'VsMenuItem' (Name=''); target property is 'NoTarget' (type 'Object') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Microsoft.VisualStudio.PlatformUI.VsToolBar', AncestorLevel='1''. BindingExpression:Path=DataContext.DockLocation; DataItem=null; target element is 'VsMenuItem' (Name=''); target property is 'NoTarget' (type 'Object')我把一個調試程序附加到我現有的Windows應用程序,我對輸出感到困惑

如何解決這個問題?

+0

而你的代碼是..? – 2013-02-13 09:07:44

+2

您可以添加更多信息並設置您的文章的格式。目前,這個問題只是一個錯誤痕跡,因此毫無意義。 – ChrisF 2013-02-13 09:07:53

+0

聽起來像你在調試Visual Studio實例。你正在開發一個VS擴展? 'sql-server-2008'如何適應這個? – leppie 2013-02-13 09:12:41

回答

0

我設法找到答案,因爲我必須將app.config文件字符串連接設置爲正確的數據庫,但它始終找不到路徑,所以我得到了app.config的目錄路徑,在我的代碼中對其進行硬編碼。

+0

我的文章發生語法變化 – 2013-03-15 18:25:40