Right-click on a file in the solution tree. Environment: Win7 64, viewing a VS2008 sln
msg:"'System.Windows.Documents.Run' is not a Visual or Visual3D."
src: "PresentationCore"
stack: " at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)\r\n at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)\r\n at at.jku.ssw.ProfIt.Controls.SolutionExplorer.SearchVisual(DependencyObject source)\r\n at at.jku.ssw.ProfIt.Controls.SolutionExplorer.treeView_MouseRightButtonDown(Object sender, MouseButtonEventArgs e)\r\n at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)\r\n at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)\r\n at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)\r\n at System.Windows.ContentElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)\r\n at System.Windows.Input.InputManager.ProcessStagingArea()\r\n at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)\r\n at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)\r\n at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)\r\n at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)\r\n at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)\r\n at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)\r\n at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)\r\n at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)\r\n at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)\r\n at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)\r\n at System.Windows.Application.RunInternal(Window window)\r\n at at.jku.ssw.ProfIt.App.Main()"
Thanks for reporting.
Cannot reproduce it (Win 7 32bit), but I see other projects having problems with the VisualTreeHelper.GetParent method. I'll look at it for a possible workaround.