Reputation: 2005
I created very simple Context Menu using Shell Extension in C#. It works fine under Windows XP 32 bit but under Windows 7 64 bits menu items not appearing.
I tried to build Setup output to x64 but no effect.
Simple Source contains ContextMenu and Setup project is here.
Looks like Wow6432 should be handled by Setup project, same for registration and adding to Global Assembly Cache
I would be appreciate for help / suggestions with this issue.
Upvotes: 2
Views: 4257
Reputation: 439
I'd the same problem. You need to change InstallUtil.dll in your setup file. I wrote a article in my blog about it. http://artyomgrigor.wordpress.com/2010/10/06/register-shell-extension-context-menu-also-on-windows-x64-part-2/
Upvotes: 0
Reputation: 941545
I have to strongly recommend you stay away from any code written by Esposito. As usual, his P/Invoke declarations in the ShellExt folder are completely wrong, they cannot work in 64-bit code. Publishing this code was very irresponsible in the first place, shell extensions should never use a .NET CLR version before 4.0. Visit pinvoke.net if you want to rescue it.
Upvotes: 3
Reputation: 37850
Check the DLL's platform in Visual Studio and make sure it's 64-bit. 64-bit processes can't load 32-bit DLLs into their process space (and vice versa, naturally).
To build a 64-bit version of your DLL, use Visual Studio's Configuration Manager to create a new solution platform. Select X64 (instead of X86 or any platform), and rebuild the project. There are also command-line switches for C# compiler, if you are using scripted builds.
Upvotes: 1