WPF PresentationFramework.Aero2 not found

4.3k views Asked by At

I'm trying to equip my first WPF application with a windows-like theme instead of the predefined gray buttons etc.

I read on SO to add this resource dictionary:

<ResourceDictionary Source="/PresentationFramework.Aero2;component/themes/Aero2.NormalColor.xaml" />

and to reference PresentationFramework.Aero2.dll.
I did so, but whenever I start my application now I get the following exception:

System.Windows.Markup.XamlParseException

Inner Exception
FileNotFoundException: "PresentationFramework.Aero2, Culture=neutral" or a dependency could not be found.

(I use .NET Framework 4.7 in my main project file and run an up to date VS 2017 version on a Windows 10 machine.)

I also tried to use Aero instead of Aero2 (that's not what I really want) but it didn't help.

Do you have got any ideas how to solve the problem? Some recherche on Google and SO did not lead me to the same problem.

Thanks in advance!

1

There are 1 answers

1
mm8 On BEST ANSWER

Try to set the Copy Local property of the assembly to true in Visual Studio before you build:

enter image description here