1

我有一个错误的问题

id 1000 (KERNELBASE.dll)

错误 ID 1026 System.IO.FileNotFoundException

当我尝试在Win 7上运行我的程序时(witch 之前运行良好),但它在 win 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,版本 = 4.0.0.0,文化 = 中性,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>

4

1 回答 1

1

PresentationFramework.Aero2从visual studio中的引用中删除并替换它PresentationFramework.Aero并删除了一些主题并替换了命名空间,现在它在win 7上运行良好并且win vista没有任何问题

于 2016-04-26T06:00:45.593 回答