Could not load file or assembly 'Catel.Windows.Aero...

Jan 27, 2012 at 4:02 AM
Edited Jan 27, 2012 at 4:05 AM

Hi Geert,

I am getting the following runtime exception thrown when I try to open a window that contains an InfoBarMessageControl:

Could not load file or assembly 'Catel.Windows.Aero, Version=, Culture=neutral, PublicKeyToken=1c8163524cbe02e6' or one of its dependencies. The system cannot find the file specified.

Apparently, the exception is caught, because if I press F5 to continue, the window opens correctly. 

This error occurs when InitializeComponent() is called for my window.  If I remove the InfoBarMessageControl from the window, it opens with no error.  I even tried creating a custom Style and ControlTemplate for the InfoBarMessageControl, which just contains a grid.  The exception is still thrown.   I am using Catel.Windows40

I think this type of exception occurs when WPF can't find a resource and is expecting there to be a theme dll for the project.

The exception appears to be harmless, but it is a bit annoying when debugging.  Any thoughts?

Jan 27, 2012 at 7:38 AM

For now, you can ignore the LoadAssemblyException (or something like that) so it will now cause you debugger to hook in. 

The reason that it tries to create an InfoBarMessageControl is because by default, the DataWindow wraps its content inside a InfoBarMessageControl. You can disable this functionality by one of the many overloads the DataWindow has. See this documentation.

If you create a task for this in the issue tracker, we will fix it in the next version.

Jan 27, 2012 at 1:13 PM

Thanks as always, for the prompt reply, Geert.  I forgot to point out that this window uses logic in behavior, so it doesn't inherit from DataWindow.  I added the InfoBarMessageControl into the Xaml myself.  I will create an issue  for this.

Jan 27, 2012 at 1:57 PM

The InfoBarMessageControl is visible when there are errors? Or does it never show up? If it shows up, the message has low prio, otherwise you probably have not added the Catel resource dictionary to the application.

Jan 27, 2012 at 2:31 PM


The control does show up, which is why I said the exception appears to be harmless.  It's just a nuisance when debugging.  I am also not a fan of exceptions being thrown when nothing is really wrong, since they are fairly expensive in CPU time.  I agree that this is low priority, though.