Attempting to clone a derived TreeViewItem Class fails as follows:
System.MissingMethodException
HResult=0x80131513
Message=Constructor on type 'System.Windows.TriggerCollection' not found.
Source=mscorlib
StackTrace:
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at TypeSupport.ObjectFactory.CreateEmptyObject(ExtendedType type, <7bda29db-1b56-429f-8967-85a9285c2b07>TypeRegistry typeRegistry, Func1 initializer, Object[] dimensions) at TypeSupport.<d27d0cc4-2c86-49c9-a412-185d46fea44b>ObjectFactory.CreateEmptyObject(<c3e10fc2-1636-4cf0-bd89-c643d1266985>ExtendedType type) at AnyClone.CloneProvider
1.InspectAndCopy(Object sourceObject, Object destinationObject, Type destinationObjectType, Int32 currentDepth, Int32 maxDepth, CloneConfiguration configuration, ObjectTreeReferenceTracker objectTree, String path, ICollection1 ignorePropertiesOrPaths) at AnyClone.CloneProvider
1.InspectAndCopy(Object sourceObject, Object destinationObject, Type destinationObjectType, Int32 currentDepth, Int32 maxDepth, CloneConfiguration configuration, ObjectTreeReferenceTracker objectTree, String path, ICollection1 ignorePropertiesOrPaths) at AnyClone.CloneProvider
1.InspectAndCopy(Object sourceObject, Object destinationObject, Type destinationObjectType, Int32 currentDepth, Int32 maxDepth, CloneConfiguration configuration, ObjectTreeReferenceTracker objectTree, String path, ICollection1 ignorePropertiesOrPaths) at AnyClone.CloneProvider
1.InspectAndCopy(Object sourceObject, Object destinationObject, Type destinationObjectType, Int32 currentDepth, Int32 maxDepth, CloneConfiguration configuration, ObjectTreeReferenceTracker objectTree, String path, ICollection1 ignorePropertiesOrPaths) at AnyClone.CloneProvider
1.Clone(T sourceObject, CloneConfiguration configuration)
at AnyClone.CloneExtensions.Clone[T](T sourceObject, CloneConfiguration configuration)
at AnyClone.CloneExtensions.Clone[T](T sourceObject)
at *******************(Object sender, MouseEventArgs e) in ************************:line 2243
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at TestForm.Application.Main()