Nes*_*tor 2 .net windows-services installutil
在开发计算机上,当我使用InstallUtil时没有错误,该服务已成功安装.
我打算将它安装在另一台计算机上(安装了.Net 4.0),因此我将以下文件复制到目标目录:
在管理员模式下运行util后,我收到以下异常:
未处理的异常:System.TypeLoadException:无法从程序集'mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'加载类型'System.Reflection.AssemblySignatureKeyAttribute'.System.ModuleHandle.ResolveType(RuntimeModule模块,Int32 typeToken,Int Ptr*typeInstArgs,Int32 typeInstCount,IntPtr*methodInstArgs,Int32 methodInst Count,ObjectHandleOnStack类型)在System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule模块,Int32 typeToken,RuntimeTypeHandle [] typeInstantiationContext,在System.Reflection.CustomAttribute的System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken,Type [] ge nericTypeArguments,Type [] genericMethodArguments)的RuntimeTypeHandle []遇到hodInstantiationContext).
在System.Reflection.InstallUtil.Main(String [] args)的System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType,Boolean inherit)上的System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly,m mly,RuntimeType caType)
似乎即使是InstallUtil也无法启动,因此无法安装该服务.
我该怎么检查?
您可以尝试从C:\ Windows\Microsoft.NET\Framework\v4.0.30319 \或其他一些相关文件夹(在C:\ Windows\Microsoft.NET中)运行"installutil.exe"吗?
我大多认为,你看到的错误主要是因为.NET版本不匹配.
| 归档时间: |
|
| 查看次数: |
3339 次 |
| 最近记录: |