简体   繁体   English

部署使用第三方COM(Activex)对象的C#应用​​程序导致应用程序崩溃

[英]Deploy C# application that uses third party COM (Activex) object causes application to crash

I have developed an C#-WPF application that uses multiple third party dlls. 我已经开发了使用多个第三方dll的C#-WPF应用程序。 Some of them which are written in C# works fine when the program is running in another PC, but one dll which is ActiveX Visual Basic 6.0 causes program to crash with the exception that class is not found. 其中一些用C#编写的程序在另一台PC上运行时可以正常工作,但是一个ActiveX Visual Basic 6.0 dll导致程序崩溃,但找不到类。 Well, I have installed that dll into the registry using regsvr32 (in system32 and in sysWOW64) and PC says that registration is done successfully, but still program crashes. 好吧,我已经使用regsvr32(在system32和sysWOW64中)将该dll安装到注册表中,PC表示注册成功完成,但程序仍然崩溃。 I have tried also to "Embed" and not to "Embed" types of this dll (creating a local copy) and still program crashes. 我也尝试过“嵌入”而不是“嵌入”此dll类型(创建本地副本),并且程序仍然崩溃。 In one of this PC I have installed Visual Studio and run the program from visual studio removing and then adding the reference that causes program to crash. 在其中一台PC中,我安装了Visual Studio,并从Visual Studio中删除并添加导致程序崩溃的引用来运行程序。 After that the program running from Visual Studio works fine, but again the compiled version from other PC crashes saying Class not found. 之后,从Visual Studio运行的程序可以正常工作,但其他PC的编译版本再次崩溃,提示未找到类。

Important: When I'm testing program in other PC I'm copying Visual Studio project repo in usb and running the program from usb in other PC. 重要说明:在其他PC上测试程序时,我正在复制USB中的Visual Studio项目存储库,并在其他PC中从USB运行程序。 Do not know if this may cause the problem 不知道这是否可能导致问题

Any help? 有什么帮助吗?

Thanks in advance 提前致谢

The problem was that the third party dll needed also that another program installed in machine, but this was not specified in documentation. 问题是第三方dll还需要在计算机中安装另一个程序,但这未在文档中指定。 After installing this program everything works fine 安装此程序后,一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM