Search code examples
c#interopwixactivextfsbuild

interop to VB6/ActiveX lib has recently stopped working in WiX deployment


As part of my TFS teambuild setup we build a VB6/ActiveX library, which is used by our C# main application. Up until recently I was grabbing a copy of the VbLib off of the build server, using TlbImp to generate an interop for the Vb6lib and referencing that interop in my solution (the interop is commited to TFS). We deploy the app with WiX and up until recently it was all working fine. Now however on deployment our app has not been recognising the VB6 lib via the interop, and only works if we link our solution directly to the Vb6Lib (i.e. no interop), which is a pain as it's under constant development thus the VB6lib's guid keeps on changing forcing the other devs to relink.

So... what's gone wrong with my interop?

I'm manually generating and checking in the interop, I'd like to automate this as part of the build process really, any ideas? is this good practice?


Solution

  • to rectify we've turned on binary compatability (so the lib's guid doesn't change on recompiling) in the vbp and we now reference the vb lib directly (thus letting VS generate its own interop). It seems likely that someone in the team committed the vbp with binary compatability off at some point but AFAICT the version control history doesn't confirm this so we're none the wiser how come it worked before but then stopped.