【发布时间】:2011-11-23 21:43:32
【问题描述】:
在将 Fax.NET 项目升级到 .NET 4 客户端配置文件后,我得到了这个异常:
MissingMethodException:
Constructor on type 'Microsoft.Win32.SafeHandles.SafeRegistryHandle' not found.
此函数的返回语句发生异常:
private static SafeHandle CreateRegistrySafeHandle(IntPtr handle)
{
Type type;
type = typeof(SafeHandle).Assembly.GetType("Microsoft.Win32.SafeHandles.SafeRegistryHandle");
return (SafeHandle)Activator.CreateInstance(
type,
BindingFlags.Instance | BindingFlags.NonPublic,
null,
new object[] { handle, true },
null);
}
这个异常有什么解决办法?
【问题讨论】: