2012-01-17 119 views
4

我在带有多个窗口的visual studio 2008中创建了一个程序。其中一个窗口使用窗口控件。现在程序在我的电脑上运行正常(windows XP),但是当我想在新安装的.net 3.5 SP1安装的另一台计算机上运行它时,我可以启动程序,但是当我使用功能区控件打开窗口时发生崩溃。 这是错误的文件,我得到的时候我尝试捕捉:WPF应用程序功能区崩溃

System.Windows.Markup.XamlParseException:异常已通过调用的目标引发异常 。对象 'System.Windows.Data.Binding'出错。 ---> System.Reflection.TargetInvocationException:异常已被调用的目标引发 。 ---> System.ComponentModel.Win32Exception: HRESULT_FROM_WIN32(ERROR_NOT_FOUND)在 Standard.HRESULT.ThrowIfFailed(字符串消息)在 Standard.NativeMethods.GetCurrentThemeName(字符串& themeFileName, 字符串&颜色,字符串&大小)在 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(对象目标,对象[] 参数,签名Sig,MethodAttributes methodAttributes, 的RuntimeTypeHandle typeOwner)在 System.Reflection.RuntimeMethodInfo.Invoke(对象OBJ,的BindingFlags invokeAttr,粘结剂粘结剂,对象[]参数,CultureInfo的文化, 布尔skipVisibilityChecks)在 System.Reflection.RuntimeMethodInfo.Invoke(对象OBJ,的BindingFlags invokeAttr,粘结剂粘结剂,对象[]参数,CultureInfo的培养物)
在System.Reflection.RuntimePropertyInfo.GetValue(Object obj, 的BindingFlags invokeAttr,粘结剂粘结剂,在System.Reflection.RuntimePropertyInfo.GetValue(对象 OBJ对象[]索引,CultureInfo的 培养),对象[]索引)在 System.Windows.Markup.StaticExtension.ProvideValue(的IServiceProvider 的ServiceProvider)在 System.Windows.Markup.BamlRecordReader.GetStaticExtensionValue(Int16的 MEMBERID)在 System.Windows.Markup.BamlRecordReader.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord,字符串propertyName的)在 System.Windows.Markup.TemplateBamlRecordReader.ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord )在 System.Windows.Markup.BamlRecordRe ader.ReadRecord(BamlRecord bamlRecord)---内部异常堆栈跟踪的末尾在 System.Windows.Markup.XamlParseException.ThrowException(字符串 消息,异常的InnerException,的Int32 LINENUMBER,的Int32 linePosition,乌里基本URI,XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds,类型的objectType)在 System.Windows.Markup.XamlParseException.ThrowException(parserContext parserContext,的Int32 LINENUMBER,的Int32 linePosition,字符串信息, 异常的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(布尔 singleRecord)在 System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment() 在System.Windows.Markup.TreeBuilder.Parse()在 System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader 读卡器,BamlRecord bamlRecord,ParserContext上下文)at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)在 System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)在 System.Windows.Markup.BamlRecordReader.ReadElement(Int64类型 指定startPosition,XamlObjectIds contextXamlObjectIds,在 System.Windows.ResourceDictionary对象 dictionaryKey)。的CreateObject(的Int32 valuePosition, 对象键)处 System.Windows.ResourceDictionary.RealizeDeferContent(对象键, 对象&值,布尔& canCache)在 System.Windows.ResourceDictionary.GetValueWithoutLock(对象键, 布尔& canCache) Sys tem.Windows.ResourceDictionary.GetValue在 System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource)(对象键,布尔& canCache)在 System.Windows.DependencyPropertyChangedEventArgs.get_NewValue()在 System.Windows.Controls.Control在 System.Windows.DependencyObject.OnPropertyChanged在 System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs E)(DependencyPropertyChangedEventArgs e)上 System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArg .OnTemplateChanged(的DependencyObject d, DependencyPropertyChangedEventArgs E)小号 参数)在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex,的DependencyProperty DP,PropertyMetadata元数据, EffectiveValueEntry oldEntry,EffectiveValueEntry & newEntry,布尔 coerceWithDeferredReference,OperationType operationType)在 System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject FO,的DependencyProperty DP)在 System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject的 容器,FrugalStructList oldContainerDependents,FrugalStructList`1 & newContainerDependents)在 个System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement的 FE,FrameworkContentElement上FCE,风格oldThemeStyle,样式 newThemeStyle,伴奏风格)在 System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement的FE, FrameworkContentElement上FCE,风格oldThemeStyle,样式newThemeStyle, 风格& themeStyleCache)在 System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject的 d,对象的属性oldValue,对象newValue)以在 System.Windows.StyleHelper.GetThemeStyle(FrameworkElement的FE, FrameworkContentElement上FCE)在 System.Windows.FrameworkElement。UpdateThemeStyleProperty()在处 System.Windows.FrameworkElement.TryFireInitialized() System.Windows.Controls.MenuItem.OnInitialized(EventArgs的) System.Windows.FrameworkElement.OnInitialized(EventArgs e)上 System.Windows.FrameworkElement。 EndInit()在 System.Windows.Controls.ItemsControl.EndInit()在 System.Windows.Markup.BamlRecordReader.ElementEndInit(对象&元件) 在System.Windows.Markup.BamlRecordReader.ReadElementEndRecord(布尔 fromNestedBamlRecordReader)在 System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRec ORD)在 System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()在 System.Windows.Markup.TreeBuilder.Parse()在 System.Windows.Markup.XamlReader.LoadBaml(流流,ParserContext parserContext,父对象,布尔closeStream)在 System.Windows.Application.LoadComponent(对象部件,乌里 resourceLocator)在 Waak.WeegschaalProgramma.WeegAuteurWindow.InitializeComponent()在 Waak.WeegschaalProgramma.WeegAuteurWindow..ctor(weegschaalProcessor weegschaalProcessor)

之前有人看到过这个错误或有任何错误帮助我的提示?我已经删除.net并完全重新安装它。

+0

重新安装。 NET将无法工作。 XAML中存在一个绑定问题。 – Ian 2012-01-17 11:41:37

+0

问题是应用程序在我的开发计算机上工作,但不是在我想安装程序的计算机上。 – 2012-01-17 12:57:50

+0

啊,对不起 - 您是否在另一台机器上安装了色带(或将其部署)?我不相信它是.NET 3.5中核心WPF的一部分 – Ian 2012-01-17 13:52:49

回答

1

你的例外是一个比我有一点不同(XamlParseException上“System.Windows.Markup.StaticExtension”提供价值引发了异常。),但我想你应该看看我的answer here