2016-04-25 55 views
0

我在那里我得到错误XAML解析异常问题仅在WIN7

ID 1000(KERNELBASE.dll)

错误ID 1026 System.IO问题.FileNotFoundException

当我尝试运行我的程序赢7(女巫之前运行良好),但它赢得8/8.1/10完美运行。我正在运行.Net Framework 4.5

我一直在试图删除代码,但随后错误出现在我的代码的其他行上,并且这种情况持续不断,所以没有人知道如何修复它或知道如何找出实际造成的情况问题

Binding Failure occurred 
Message : Managed Debugging Assistant ' Binding Failure ' has detected a problem in ' F: \ Omini \ Omini Dækberegner.exe ' . 
Additional information : the assembly with the display name ' PresentationFramework.Aero2 ' could not be loaded into the binding context ' 

C#

 InitializeComponent(); 
     bredebox_nu.Focus(); 
     textBoxes = new List<TextBox> { bredebox_nu, profilbox_nu, Fælgestr_nu, bredebox_ny, profilbox_ny, Fælgestr_ny, oprofilbox, obredebox, oFælgestr }; 
     win.SourceInitialized += new EventHandler(win_SourceInitialized); 
     List<biler> items = new List<biler>(); 

其他错误

System.Windows.Markup.XamlParseException occurred 
HResult=-2146233087 
Line Number = 616 
Line Position = 48 
Message = ' There were triggered an exception at setting the property ' System.Windows.FrameworkElement.Style ' . ' Line number ' 616 ' and line position ' 48' . 
Source = Presentation Framework 
Stack Trace : 
    by System.Windows.Markup.WpfXamlLoader.Load (XamlReader xamlReader , IXamlObjectWriterFactory writer factory , Boolean skipJournaledProperties , Object rootObject , XamlObjectWriterSettings settings , Uri baseUri) 
    by System.Windows.Markup.WpfXamlLoader.LoadBaml (XamlReader xamlReader , Boolean skipJournaledProperties , Object rootObject , XamlAccessLevel access level , Uri baseUri) 
    by System.Windows.Markup.XamlReader.LoadBaml (Stream stream , ParserContext parserContext , Object parent , Boolean close stream) 
    by System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) 
    by Omini_Tires_And_rims.MainWindow.InitializeComponent() i C:\Users\Sindakewin\documents\visual studio 2015\Projects\omini_dækberegner\omini_dækberegner\MainWindow.xaml:linje 1 
    by Omini_Tires_And_rims.MainWindow..ctor() i C:\Users\Sindakewin\documents\visual studio 2015\Projects\omini_dækberegner\omini_dækberegner\MainWindow.xaml.cs:linje 210 
    InnerException: 
    FileName=PresentationFramework.Aero2, PublicKeyToken=31bf3856ad364e35 

FusionLog ==== state information prior binding === 
LOG: Display Name = PresentationFramework.Aero2, PublicKeyToken = 31bf3856ad364e35 
(Partial) 
WRN: There was delivered about a partial binding for assembly: 
WRN: Assemblyname: PresentationFramework.Aero2, PublicKeyToken = 31bf3856ad364e35 | Domain ID: 1 
WRN: A partial binding Occurs tabloid is only given part of assemblyens display name. 
WRN This may cause the binder inputting a wrong assembly. 
WRN: It is recommended to give up fully specified text ID for the Assembly, 
WRN: consisting of the simple name, version, culture and token for the public key. 
WRN: For more information and common solutions to this problem in the white paper http://go.microsoft.com/fwlink/?LinkId=109270. 
LOG: Appbase = file: /// F:/Omini/
LOG: First PrivatePath = NULL 

调用程序集:Presentation Framework,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35。

LOG: This binding initiates in loadingcontex default. 
LOG: User application configuration file: F: \ Omini \ Omini Dækberegner.exe.Config 
LOG: User host configuration file: 
LOG: User machineconfigurationsfile from C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ config \ machine.config. 
LOG: Policy not applied to reference at this time (private, custom, partial, or location-based assemblybinding). 
LOG: Attempting to download new URL file: /// F: /Omini/PresentationFramework.Aero2.DLL. 
LOG: Attempting to download new URL file: /// F: /Omini/PresentationFramework.Aero2/PresentationFramework.Aero2.DLL. 
LOG: Attempting to download new URL file: /// F: /Omini/PresentationFramework.Aero2.EXE. 
LOG: Attempting to download new URL file: /// F: /Omini/PresentationFramework.Aero2/PresentationFramework.Aero2.EXE. 
) 
HRESULT = -2147024894 
    Message = The file or the assembly ' PresentationFramework.Aero2 , PublicKeyToken = 31bf3856ad364e35 ' or one of its dependencies could not be loaded . The specified file was not found. 
    Source = mscorlib 
    StackTrace: 
    by System.Reflection.RuntimeAssembly._nLoad (AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly location hint, Stack Crawl Mark & ​​stack field, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
     by System.Reflection.RuntimeAssembly.nLoad (AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly location hint, Stack Crawl Mark & ​​stack field, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
     by System.Reflection.RuntimeAssembly.InternalLoadAssemblyName (AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, Stack Crawl Mark & ​​stack field, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
     by System.Reflection.Assembly.Load (AssemblyName assemblyRef) 
     by System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly (BamlAssembly bamlAssembly) 
     by System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType (BamlType bamlType) 
     by System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType (BamlType bamlType, int16 typeid) 
     by System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType (int16 typeid) 
     by System.Windows.Baml2006.Baml2006Reader.Process_ElementStart() 
     by System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord() 
     by System.Windows.Baml2006.Baml2006Reader.ReadObject (KeyRecord record) 
     by System.Windows.ResourceDictionary.CreateObject (KeyRecord key) 
     by System.Windows.ResourceDictionary.OnGettingValue (Object key, Object & value, Boolean & canCache) 
     by System.Windows.ResourceDictionary.OnGettingValuePrivate (Object key, Object & value, Boolean & canCache) 
     by System.Windows.ResourceDictionary.GetValueWithoutLock (Object key, Boolean & canCache) 
     by System.Windows.ResourceDictionary.GetValue (Object key, Boolean & canCache) 
     by System.Windows.DeferredResourceReference.GetValue (Base Value Source Internal value source) 
     by System.Windows.DependencyPropertyChangedEventArgs.get_NewValue() 
     by System.Windows.Controls.Control.OnTemplateChanged (DependencyObject d, DependencyPropertyChangedEventArgs e) 
     by System.Windows.DependencyObject.OnPropertyChanged (DependencyPropertyChangedEventArgs e) 
     by System.Windows.FrameworkElement.OnPropertyChanged (DependencyPropertyChangedEventArgs e) 
     by System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 
     by System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 
     by System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject fo, DependencyProperty dp) 
     by System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents) 
     by System.Windows.StyleHelper.DoStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle) 
     by System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache) 
     by System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 
     by System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
     by System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 
     by System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 
     by System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 
     by System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) 
     by System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value) 
     by MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value) 
     by MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) 
    InnerException: 

的XAML <GridViewColumn Header="Model" Width="140" > <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock x:Name="Txt" Text="{Binding Model}" Foreground="#FF00FB0B" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn>

+0

您的屏幕图像呈现不同类型的错误。 –

+0

是的,那是因为我在我的日志中得到的错误,我认为是有关该错误 – shawn

+0

什么'InnerException'说?总是看到'InnerException'因为它给出了一个实际的错误。 – StepUp

回答

0

我删除从Visual Studio中的引用PresentationFramework.Aero2PresentationFramework.Aero取代它,并删除了一些主题,并取代了命名空间,现在它运行在Win 7罚款,没有任何取胜远景问题