2012-04-18 30 views
1

在客戶機上,我收到了此錯誤。有人可以建議我可能是什麼問題?未找到字段:'Microsoft.Windows.Controls.DataGrid.DeleteCommand'

這是問題的完整堆棧跟蹤:

Error Message 
Field not found: 'Microsoft.Windows.Controls.DataGrid.DeleteCommand'. 
Stack Trace 
    at ABC.MyNameSpace.DataGridGridUserControl.OnCanExecuteDelete(Object sender, CanExecuteRoutedEventArgs e) 
    at System.Windows.Input.CanExecuteRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target) 
    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.RaiseEvent(RoutedEventArgs args, Boolean trusted) 
     at System.Windows.Input.RoutedCommand.CriticalCanExecuteWrapper(Object parameter, IInputElement target, Boolean trusted, CanExecuteRoutedEventArgs args) 
     at System.Windows.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting) 
     at System.Windows.Input.RoutedCommand.CriticalCanExecute(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting) 
     at System.Windows.Input.RoutedCommand.CanExecute(Object parameter, IInputElement target) 
     at MS.Internal.Commands.CommandHelpers.CanExecuteCommandSource(ICommandSource commandSource) 
     at System.Windows.Controls.Primitives.ButtonBase.UpdateCanExecute() 
     at System.Windows.Controls.Primitives.ButtonBase.HookCommand(ICommand command) 
     at System.Windows.Controls.Primitives.ButtonBase.OnCommandChanged(ICommand oldCommand, ICommand newCommand) 
     at System.Windows.Controls.Primitives.ButtonBase.OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 
     at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
     at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
     at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 
     at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 
     at System.Windows.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot) 
     at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot) 
     at System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) 
     at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) 
     at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) 
     at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) 
     at System.Windows.FrameworkElement.ApplyTemplate() 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Control.MeasureOverride(Size constraint) 
     at Microsoft.Windows.Controls.DataGrid.MeasureOverride(Size availableSize) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
     at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Control.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
     at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
     at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Control.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
     at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Control.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Grid.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 
     at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Decorator.MeasureOverride(Size constraint) 
     at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Controls.Border.MeasureOverride(Size constraint) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.Window.MeasureOverrideHelper(Size constraint) 
     at System.Windows.Window.MeasureOverride(Size availableSize) 
     at System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
     at System.Windows.UIElement.Measure(Size availableSize) 
     at System.Windows.ContextLayoutManager.UpdateLayout() 
     at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) 
     at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() 
     at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 
     at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 
     at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) 
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 
     at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 

這是一個WPF的桌面應用程序,我們使用的是2009年WPFToolkit六月我懷疑WPF工具包沒有正確安裝過程中安裝客戶端機器上並且因爲找不到datagrid的刪除命令。有人可以幫我解決這個問題嗎?

感謝,

+0

您是第一次安裝還是重新安裝升級 – 2012-04-18 10:19:02

+0

我們提供最新的產品版本,但每個版本都會刪除舊版本的應用程序並安裝新版本。不是像插件一樣。此外,問題不在於安裝,而是在GUI(使用數據網格時)應用程序崩潰時處理某些事情。 – Rohit 2012-04-18 10:22:30

+0

您是否在另一個系統上安裝了該工具,是否發現了相同的錯誤。如果你得到相同的錯誤,那麼你的裝配中可能會出現錯誤。然後檢查源代碼和文件。 – 2012-04-18 10:40:10

回答

2

當事情發生改變的組裝此發生,並創建一個或更糟重命名.ddl文件。我建議你下載Reflector(可以免費試用)並檢查.dll文件。

+0

應用程序安裝在客戶端計算機上,因此在那裏沒有源代碼。你的意思是有人故意在應用程序安裝的程序文件中更改了一些dll文件?如果是這種情況,那麼我認爲應用程序甚至不會啓動。不是嗎? – Rohit 2012-04-18 11:12:26

+1

我不能確保這是故意的,但肯定這是發生的事情..當然,如果缺少.ddl文件系統無法檢測到它。 – 2012-04-18 11:17:17

+0

好的,我會和客戶交談,並嘗試在他的系統上安裝遙控器。修復現有的框架。 – Rohit 2012-04-18 12:01:33