Search code examples
vb.netvisual-studio-2010ocx

Visual Studio 2010 generates an "error" on build


I've got a project that uses a third party OCX. The OCX was recently updated with a new method. I'm trying to insert code that utilizes that new method:

EPS.Refresh_IO_Link(ControllerRow("ControllerPort"), ControllerRow("ControllerSettings"))

It compiles fine, but when I try to run it from within VS2010 it generates the following error:

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

This is not true. It shows up in Intellisense, and if I do a rebuild the error goes away. However running it in debug mode always generates the error.

I've tried cleaning and rebuilding the solution, but have the same error each time.


Solution

  • DLL Hell. Remove the reference to the .ocx in the project, and then re-add it. If the .ocx was not compiled with binary compatibility, then you are likely still referencing the old version of the .ocx. Also, make sure the new .ocx is registered on your PC (regsrv32.exe).