I need to use the BitmapImage
class which is part of the System.Windows.Media.Imaging
namespace.
From Visual Studio 2012 Express, I started with a WPF desktop application project template, and I can see the relevant dll, PresentationCore.dll
is present under the references.
This link on MSDN indicates this reference should be sufficient. This thread indicates the same, and highlights the fact that the necessary dll is referenced by default when using a typical wpf project template in VS2012.
And yet, in my C# code behind, the compiler complains on my using System.Windows.Media.Imaging;
statement that Media
cannot be found.
This problem seems to not be uncommon, and yet I found no solution to it.
UPDATE: When looking at the properties for the reference to PresentationCore.dll, I see that version is 4.0.0.0 and runtime version is 4.0.30319. I am making a cheap relation to the fact that BitmapImage exists only for .net 4.5 supposedly... Could this be a hint to the problem ?