views:

23

answers:

1

I have a WPF app that works beautifully if I "debug" (F5) in Visual Studio (Debug and Release mode both work), but if I try to double-click the .exe in the bin\Release folder, Windows kills the application immediately.

The problem appears to be that the executable can't find "PresentationFramework.Aero", which I added to my App's resource dictionaries as follows:

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary
        Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
    <ResourceDictionary
        Source="pack://application:,,,/WPFToolkit;component/Themes/Aero.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>

What is the proper way to include the Aero theme (or point to it) so I can release my app?


Here's the exact error I'm getting:

Could not load file or assembly 'PresentationFramework.Aero, Culture=neutral' or one of its dependencies. The system cannot find the file specified.":"PresentationFramework.Aero, Culture=neutral

+1  A: 

Turned out I just needed to add some detail to my first ResourceDictionary declaration:

<ResourceDictionary
    Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
DanM