我在Visual Studio 2008中创建了一个包含多个窗口的程序。其中一个窗口使用Windows Ribbon控件。现在,该程序在我的计算机(Windows XP)上运行良好,但当我想在安装了.NET 3.5 SP1的另一台计算机上运行它时,我可以启动该程序,但当我打开带有Ribbon控件的窗口时就会崩溃。 这是我在try catch中获取的错误文件:
System.Windows.Markup.XamlParseException: 目标调用的异常已经被抛出。对象'System.Windows.Data.Binding'错误 ---> System.Reflection.TargetInvocationException: 目标调用的异常已经被抛出。---> System.ComponentModel.Win32Exception: HRESULT_FROM_WIN32(ERROR_NOT_FOUND) Standard.HRESULT.ThrowIfFailed(String message) Microsoft.Windows.Shell.SystemParameters2._InitializeThemeInfo() Microsoft.Windows.Shell.SystemParameters2..ctor() Microsoft.Windows.Shell.SystemParameters2.get_Current() --- 内部异常堆栈跟踪结束 --- 在System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) 在System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) 在System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) 在System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)<br/> 在System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) 在System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) 在System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider) 在System.Windows.Markup.BamlRecordReader.GetStaticExtensionValue(Int16 memberId) 在System.Windows.Markup.BamlRecordReader.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord, String propertyName) 在System.Windows.Markup.TemplateBamlRecordReader.ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord) 在System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) --- 内部异常堆栈跟踪结束 --- 在System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType) 在System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException) 在System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) 在System.Windows.Markup.TemplateBamlRecordReader.ReadNonContentRecord(BamlRecord bamlRecord) 在System.Windows.Markup.TemplateBamlRecordReader.ReadRecord(BamlRecord bamlRecord) 在System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord) 在System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment() 在System.Windows.Markup.TreeBuilder.Parse() 在System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader reader, BamlRecord bamlRecord, ParserContext context) 在System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord) 在System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) 在System.Windows.Markup.BamlRecordReader.ReadElement(Int64 startPosition, XamlObjectIds contextXamlObjectIds, Object dictionaryKey) 在System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition, Object key) 在System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache) 在System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache) 在System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache) 在System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource) 在System.Windows.DependencyPropertyChangedEventArgs.get_NewValue() 在System.Windows.Controls.Control.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 在System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 在System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject fo, DependencyProperty dp) 在System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList1& exclusionContainerDependents, FrugalStructList
1& oldContainerDependents, FrugalStructList`1& newContainerDependents) 在System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style) 在System.Windows.StyleHelper.Update
有没有人之前遇到过这个错误或者有什么提示可以帮助我解决?我已经删除了.NET并重新安装它。