2012-03-13 106 views
3

當我在windows phone 7.1 silverlight應用程序中導航到頁面時,出現以下異常。這是什麼意思,我該如何解決這個問題?Windows phone 7 FileNotFoundException System.Windows.debug.resources

System.IO.FileNotFoundException occurred 
Message=File or assembly name 'System.Windows.debug.resources, Version=2.0.5.0, Culture=en-US, PublicKeyToken=7cec85d7bea7798e', or one of its dependencies, was not found. 
StackTrace: 
    at System.ThrowHelper.throwVersion37CompatException(ExceptionType newEType, String newString, ExceptionType oldEType, String oldString) 
    at System.Reflection.Assembly.Load(String assemblyString) 
    at System.Windows.Resx..ctor() 
    at System.Windows.Resx.GetLoader() 
    at System.Windows.Resx.GetStringHelper(String name) 
    at System.Windows.Resx.GetString(String name) 
    at System.Windows.PropertyAccessPathStep.ConnectToPropertyInSource(Boolean isSourceCollectionViewCurrentItem) 
    at System.Windows.PropertyAccessPathStep.ConnectToProperty() 
    at System.Windows.PropertyAccessPathStep.ReConnect(Object newSource) 
    at System.Windows.PropertyPathListener.ReConnect(Object source) 
    at System.Windows.Data.BindingExpression.SourceAcquired() 
    at System.Windows.Data.BindingExpression.System.Windows.IDataContextChangedListener.OnDataContextChanged(Object sender, DataContextChangedEventArgs e) 
    at System.Windows.Data.BindingExpression.DataContextChanged(Object sender, DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.OnDataContextChanged(DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.OnAncestorDataContextChanged(DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.NotifyDataContextChanged(DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.OnAncestorDataContextChanged(DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.NotifyDataContextChanged(DataContextChangedEventArgs e) 
    at System.Windows.FrameworkElement.OnTreeParentUpdated(DependencyObject newParent, Boolean bIsNewParentAlive) 
    at System.Windows.DependencyObject.UpdateTreeParent(IManagedPeer oldParent, IManagedPeer newParent, Boolean bIsNewParentAlive, Boolean keepReferenceToParent) 
    at MS.Internal.FrameworkCallbacks.ManagedPeerTreeUpdate(IntPtr oldParentElement, IntPtr parentElement, IntPtr childElement, Byte bIsParentAlive, Byte bKeepReferenceToParent, Byte bCanCreateParent) 
    at MS.Internal.XcpImports.Measure_WithDesiredSizeNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) 
    at MS.Internal.XcpImports.UIElement_Measure_WithDesiredSize(UIElement element, Size availableSize) 
    at System.Windows.UIElement.Measure_WithDesiredSize(Size availableSize) 
    at System.Windows.Controls.VirtualizingStackPanel.MeasureChild(UIElement child, Size layoutSlotSize) 
    at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint) 
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight) 
    at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) 
    at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize) 
    at System.Windows.FrameworkElement.MeasureOverride(Size availableSize) 
    at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) 
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight) 
    at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight) 
    at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize) 
    at System.Windows.UIElement.Measure(Size availableSize) 
    at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) 
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight) 
    at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) 
    at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize) 
    at System.Windows.FrameworkElement.MeasureOverride(Size availableSize) 
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight) 
    at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) 
    at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize) 
    at System.Windows.FrameworkElement.MeasureOverride(Size availableSize) 
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight) 

回答

2

我有這個崩潰的異常,也和我的情況下,它總是在我做了一個錯誤的結合在我的XAML中發生的錯誤。

比如我有屬性:

public String Name {get;set;} 

而且在XAML我輸入了錯誤的綁定:

<TextBlock Text="{Binding Namme}"/> 

在我的情況下,這引起了FileNotFound的異常的System.Windows.debug的.resources。

當我修復了一切都再次合作的綁定。

3

其對WP 7.1的支票,MSDN link