system.invalidoperationexception在启动时,在开发机器上可以 [英] system.invalidoperationexception on startup, OK on dev machine

查看:80
本文介绍了system.invalidoperationexception在启动时,在开发机器上可以的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个在VB 2005中编写的小型应用程序,可以正常工作 在开发环境中的计算机上正常运行 或在构建后独立运行.它只是不能在任何其他机器上使用.它 会到达初始屏幕,但是当超时时,我得到了 遇到问题并需要解决"消息.
P9:system.invalidoperationexception

我从项目中删除了斜杠屏幕,现在消息完全消失了.

我确保目标计算机具有.NET 2.0,并在使用sp1和不使用sp1的情况下进行了尝试.

是什么可能导致此行为,或更可能是我可以采取哪些措施来缩小原因?

任何帮助将不胜感激.

添加:::项目中有一个小的.ocx控件,用于与PLC通信.
我使用regsvr32来确保我的.ocx已注册.现在,按照 错误消息进入调试器,我发现内部消息是:可以 未加载表格,则该类未注册".并没有说哪一堂课 但是现在只有一种形式,即Form1(Main).现在有人 知道导致此消息的原因是什么?


Ken

Hello All,

I have a small application program I have written in VB 2005 that works fine on the computer on which is was developed, in the the environment or standalone after build. It just won't work on any other machine. It will go as far as the splash screen, but when that times out I get the "encountered a problem and needs to close" message.
P9: system.invalidoperationexception

I removed the slash screen from the project and now the message before anything shows up at all.

I made sure the target machine has .NET 2.0, tried with and without sp1.

What is likely to cause this behavior, or more likely what can I do to narrow down the cause?

Any help would be appreciated.

Added::: There is a small .ocx control in the project for communicating with a PLC.
I used regsvr32 to make sure my .ocx was registered, it was.   Now, following the error message into the debugger I find that the inner message is: "Can not load form, the class is not registered". It doesn't say which class but there is now only one form, Form1(Main). Now does anyone have an idea what is causing this message?


Ken

推荐答案

最可笑的是,
初始屏幕外观表明您已成功安装.net Framework.让我们来看看您的PLC activeX控件.

在部署应用程序时,您是否确定它已存在于先决条件中?
您是否尝试过删除它,在所有调用该activex的行中添加注释,然后部署您的应用程序,然后查看是否是问题的起因?

我使用Siemens S7-200 activeX并成功部署了多个应用程序.

希望您的答复告诉我您是否取得了任何进展
Hi khirst,
    splash screen appearance implies that you successfully installed .net framework successfully. let's see your PLC activeX control.

Did you make sure that it exists in prerequisites when you were deploying your app?
Have yo tried removing it, commenting all lines calling that activex, deploying your app and see if it is the cause of the problem?

I use Siemens S7-200 activeX and deployed several apps with no problem.
       
Hope to get your reply to tell me if you achieved any progress     


这篇关于system.invalidoperationexception在启动时,在开发机器上可以的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆