什么导致运行程序时报TargetInvocationExeption与StrongName错误

wxlcanary 2010-06-17 04:06:52
有一个自己编的VB.NET程序,编译后生安装包。客户端双击安装包就可以将程序安装到本地。安装后,点击桌面上的图标就可以启动程序。
1. 90%的客户端能正常启动程序。
2. 8%的客户端在启动程序时,得到以下报错。
Error:Exception has been thrown by the target of invocation.
Exception Stack Trace:
System.Reflection.TargetInvocationException
at System.Runtime.Type.CreateInstanceImpl(Boolean, publicOnly)
at System.Activator.CreateInstance(Type Type, Boolean nonPublic)
at Vbb.Mtin.UI.Common.BaseStartup.Run(Type mainFromType, Boolean enforceSecurity)
3. 2%的客户端在启动程序时,得到以下报错。
Error: Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neual, PublicKeyToken=?????? failed.

我查了很久都没有弄清楚导致这两个问题发生的原因,请大家帮助!第1个问题是不是与.net framwork的版本有关系?第2个是不是和注册表中的StrongName值有关系。多谢!
...全文
67 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wxlcanary 2010-06-23
  • 打赏
  • 举报
回复
没有人遇到过同样的问题吗?
wxlcanary 2010-06-21
  • 打赏
  • 举报
回复
能帮助说的再具体点吗?谢谢!
水哥阿乐 2010-06-17
  • 打赏
  • 举报
回复
好像是某引用文件的版本不对

16,721

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧