While deploying the console on a Windows 7 x64 machine, the install works but the MMC snapin cannot be loaded.
Error BadImageFormatException. at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
Add additional entries to the mmc.exe.config file in the system32 directory (C:\Windows\system32\):
startup useLegacyV2RuntimeActivationPolicy="true">
supportedRuntime version="v4.0"/>
supportedRuntime version="v2.0.50727"/>
startup>
If the config file does not already exist, then create it (with nodepad) and enter the following lines:
xml version="1.0" encoding="utf-8"?>
configuration>
startup useLegacyV2RuntimeActivationPolicy="true">
supportedRuntime version="v4.0"/>
supportedRuntime version="v2.0.50727"/>
startup>
configuration>
Note: The additional entries in the mmc.exe.config file get MMC to bind to version 4 of .NET as opposed to the default version 2 in Win7 x64.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center