srm.exe install shell extension: Fails with “Cannot cast the underlying exported value”
问题 I have written this simplistic shell extension (explorer context menu) with SharpShell: [ComVisible(true)] [COMServerAssociation(AssociationType.AllFiles)] public class SampleExtension : SharpContextMenu { protected override bool CanShowMenu() { return true; } protected override ContextMenuStrip CreateMenu() { var menu = new ContextMenuStrip(); var item = new ToolStripMenuItem { Text = "Hello world!" }; menu.Items.Add(item); return menu; } } It works in debug with SharpShell Server Manager,