2016-04-25 57 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罰款,沒有任何取勝遠景問題