I cannot find the namespace for ShellFile
.
I have added using System.Windows.Shell
and also tried loading the Windows7APICodePack through the package manager console:
PM> install-Package Windows7APICodePack
Installing 'Windows7APICodePack 1.0.0.0'.
You are downloading Windows7APICodePack from Microsoft, the license agreement to which is available at http://code.msdn.microsoft.com/WindowsAPICodePack/Project/License.aspx. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Windows7APICodePack 1.0.0.0'.
Adding 'Windows7APICodePack 1.0.0.0' to CADBuilderGUI.
Successfully added 'Windows7APICodePack 1.0.0.0' to CADBuilderGUI.
I just tried installing the later version 1.1.0.0 with:
PM> Install-Package Windows7APICodePack-Shell
but still no luck.
I am simply trying to get a thumbnail image of a file with:
ShellFile shellFile = ShellFile.FromFilePath(files[0]);
Bitmap shellThumb = shellFile.Thumbnail.ExtraLargeBitmap;
But it doesn't know what ShellFile
is.
Any suggestions?
This is not a duplicate of this because PresentationFramework.dll is added by reference and I am building in Framework 4.0.
using System.Windows.Shell;
did you actually right click on thereferences
node and add the reference manually as well..? – Snappish