Shell thumbnail handler (C#) Sample does not work [workaround]

Jul 15, 2011 at 11:43 AM

Hi,

The setup project, which is part of the "CSShellExtThumbnailHandler" Example, does not install on my computer. Whenever I run the installer it says:

"Error 1001. Unable to get installer types in the C:\Program Files\Default Company Name\CSShellExtThumbnailHandlerSetup(x64)\CSShellExtThumbnailHandler.dll assembly. --> Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

I tried to figure out which assembly couldn't be loaded but fusion log viewer didn't show anything. Is there any other way to figure out what is going wrong?

Building the sample is no problem, just the installer does not work, and I have no idea what the problem might be.

Thx
Tom

btw. I'm using Visual Studio 2010 on Windows 7 x64

Jul 19, 2011 at 9:42 AM

OK, I figured it out by myself.

The problem is, all external dependencies (which are Microsoft.WindowsAPICodePack.Shell.dll and Microsoft.WindowsAPICodePack.ShellExtensions.dll) need to be copied into the GAC before the ThumbnailHandler is registered (either with regasm or in code). That means, in the installer project the dependencies should be copied to the GAC first and the Custom Actions (which register the dll) should be called second. But I did not figure out a way to do this in a Visual Studio Setup project, so I just created a additional installer that just installs the dependencies. This is not beautiful, but it works.

@1code team: Please update the example accordingly. The current version does not work if you follow the instructions in Readme.txt.

Jul 22, 2011 at 11:30 AM

Hi Tom,

Can you provide me some help in writing Namespace Extension(C# or C++).

There are samples for extending window shell in all-in-one code framework, but no example for writing namespace extension.

regards,

kpant