0

I'm trying to create an MMC snap-in to go along with an application that I've made. I've got so far but Ive ran into an issue with it.

I've done the main class and the settings like "displayname" "description" and "vendor" have been added. Inherits snapininstaller is done as well and this all seems to work. I can compile to a dll and when i use installutil.exe it runs through with no errors and I can see the GUID being created in the registry.

When I run mmc.exe though I can't see the option to add it in. Is there something else I need to do for MMC.exe to pick it up?

I'm developing it on Win7 64 bit so is there another place in the registry I need to add the GUID for it to pick this up?

Thanks

Shovers_
  • 497
  • 2
  • 13
  • this maybe a duplicate of http://stackoverflow.com/questions/8812112/snap-in-not-showing-up-in-windows-7/9002854#9002854 ...I'll try that suggestion and see – Shovers_ Jan 19 '15 at 19:07

1 Answers1

0

Ok so, figured it out eventually - was a bit of an adventure.

Recompiling the dll to x64 architecture was enough to get me around the initial problem and have the snap-in appear in the available list.

Ive since redone it again targeting x86 and ran mmc.exe /32 and its appeared there to. Happy days.

However, When adding it I was then presented with the error "System.BadImageFormatException" "this assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded"

So eventually I noticed that the target framework for the project was set to 4 but the reference for Microsoft.managementconsole was v3. Ive changed the target framework now to 3. As a consequence all of the other references that were v4 have gone down to v2 or aren't available anymore.

It seems this is enough to let me add the snap in error free and have it run.

Shovers_
  • 497
  • 2
  • 13