Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shell extensions with .NET 4.0

Any one have any docs or examples of how to add menu items to the explorer shell with .NET.

Can only find info saying it should be possible now with .NET 4.0 but not how to do it.

like image 452
Alex Avatar asked Jun 16 '10 13:06

Alex


2 Answers

MSDN Magazine had an article about managed shell extensions long back in 2004:

Create Namespace Extensions for Windows Explorer with the .NET Framework

I don't think that the basic mechanism has changed in .NET 4.0. The difference though is that with .NET 4.0 you can safely ignore the red warning on top of that article ("...Microsoft recommends against writing managed shell extensions...") because version 4.0 of the CLR can be hosted side-by-side with other versions in the same process. This has previously not been possible.

Update:

The All-In-One Code Framework now contains an example for managed shell extensions (CSShellExtContextMenuHandler).

like image 83
Dirk Vollmar Avatar answered Sep 21 '22 17:09

Dirk Vollmar


Even using .NET 4, with side-by-side execution, writing a managed shell extension might not be a good idea: According to Microsoft employee Jialiang Ge, "Microsoft [...] has not determined whether it will support managed shell extensions for the long term [...] Microsoft [...] will not support managed shell extensions and recommends against writing them."

like image 31
Marc Sigrist Avatar answered Sep 19 '22 17:09

Marc Sigrist