We have a .NET project that relies on an old VB6 OCX (The entire thing was originally VB6 and C++ and we are gradually migrating it all to .Net but we need it working in its present half-migrated state). One of our developers can build the project but no-one else can.
The developer finds that he has references to an interop.foo.dll file and an AxInterop.foo.dll, both of which exist.
I have built the VB6 project and added a reference to the OCX into my copy of the .NET project by browsing to it. I now have a reference to the interop.foo.dll, which exists, but I do not have a reference to the AxInterop.foo.dll and that file does not exist either. I also have errors like "Type 'AxFoo.AxocxFoo' is not defined" which stop the project building.
How would I go about generating this AxInterop.foo.dll file and referencing it? I can see lots of StackOverflow questions about what these files are but nothing saying how they are generated!
Many thanks,
--- Alistair.
I have solved it: the solution is to use the
aximp.exe
command-line tool.
References
Equivalent question and answer on a Microsoft forum
MSDN page about aximp.exe(Windows Forms ActiveX Control Importer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With