MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.28k stars 2.45k forks source link

Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception #3716

Closed furqansafdar closed 4 years ago

furqansafdar commented 4 years ago

Upgraded my application to latest pre-release version 2.0.0-alpha0660 and i started getting below exception upon running the application.

System.Windows.Markup.XamlParseException HResult=0x80131501 Message='Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.' Line number '6' and line position '5'. Source=PresentationFramework StackTrace: at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at FSX._1Rule.Wpf.App.InitializeComponent() at FSX._1Rule.Wpf.App.Main()

Inner Exception 1: FileLoadException: Could not load file or assembly 'MahApps.Metro, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

After searching and going through below issue post, i have now reverted back to previous stable release of version 1.6.5. https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/1107

Environment:

punker76 commented 4 years ago

@furqansafdar If you are using MDIX together with latest MahApps alpha v2.0 then you should use also the latest pre-release of MaterialDesignThemes.MahApps.

furqansafdar commented 4 years ago

Getting this when giving it another try to upgrade as per your suggestion. Same exception came back again. I think you should reopen this issue.

Unable to resolve dependencies. 'MahApps.Metro 2.0.0-alpha0660' is not compatible with 'MaterialDesignThemes.MahApps 0.1.1-ci901 constraint: MahApps.Metro (>= 2.0.0 && < 3.0.0)'.

Further tried couple of more options, none of them worked even removed MaterialDesignThemes altogether but still the exception exists.