在VB.NET中更新OCX [英] Updating an OCX in VB.NET

查看:74
本文介绍了在VB.NET中更新OCX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含VB6 OCX的.NET项目. OCX最近添加了新功能.在我的代码中,我删除了所有对OCX的旧引用,并添加了新副本,以及使用新功能的代码行:

I have a .NET project that includes a VB6 OCX. The OCX recently had a new function added. In my code I stripped out all old references to the OCX and added the new copy, as well as a line of code that utilized the new function:

EPS.Refresh_IO_Link(App("EPSPort"), App("EPSPortSettings"))



Refresh_IO_Link显示在Intellisense中;该应用程序可以正常编译;当我尝试直接从Release文件夹运行内置的EXE时,它运行正常.

但是,当我尝试通过Debug运行它时,Refresh_IO_Link在其下呈蓝色弯曲,并且出现错误:



Refresh_IO_Link shows up in Intellisense; the application compiles just fine; when I attempt to run the built EXE directly from the Release folder, it runs fine.

However when I try to run it through Debug, Refresh_IO_Link gets a blue squiggly under it, and I get the error:

''Refresh_IO_Link'' is not a member of ''AxEPSIO.AxctlEPSIO''.



如果我尝试再次编译它,错误就会消失,并且一切都会像以前一样正常运行.只是当我尝试调试时,我才遇到问题.

我知道我现在可以从技术上推出更新的可执行文件,但是稍后我会担心当我尝试更改代码并由于这个奇怪的问题而无法在调试模式下运行它时遇到问题.

解决此问题的好方法是什么?

在此先谢谢您.



If I try to compile it again, the error goes away, and everything runs fine as before. It''s just when I try to debug that I get the problem.

I know that I could technically roll the updated executable out now, but I''m concerned about later on when I try to make code changes and find myself unable to run it in debug mode due to this weird problem.

What is a good way to get around this issue?

Thanks in advance.

推荐答案

仔细检查您的引用,包括您的build/output/debug目录.

进行构建->清洁解决方案,构建->全部重建.

这样可以解决吗?
Double-check your references, including your build/output/debug directories.

Do a Build -> Clean Solution, Build -> Rebuild All.

Does that fix it?


这篇关于在VB.NET中更新OCX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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