Links

How to resolve broken reference problems with VBUC

Broken reference problems with VBUC(VB.NET) -> WebMap(C#)
C# build failed
When we have a C# project coming from VB.NET to convert to Web Map, we use 2 Mobilize (VBUC, WebMap) tools to achieve it, this process is known as a double jump and can cause broken reference problems when compiling to C#, this is caused by external references (third-party libraries or client's own projects) that are resolved by the Mobilize.NET Visual Basic Upgrade Companion (VBUC) tool and with an analysis process it generates a type report to determine which are external and internal:
With the report of types of references, the VBUC analyzes each of the external ones to obtain their information and determine the type of mapping, in the case of not been able to obtain or by configuration, a VBUC process is executed to resolve it via the creation of an InterOp object.
This process creates some wrappers on the machine where the migration is performed, if it is compiled on the same machine, there are no compilation problems, however, if the project is copied to another it will not have the wrappers generated by the VBUC and therefore it will report a problem of broken references.
Resolving broken external references
To solve this problem there is a manual process equivalent to that of the VBUC tool, which consists of 4 steps:
  • Prerequisites: Obtain the libraries from the original project that generate a broken reference in the migrated project.
  • Library registration: Use the Regsvr32 (user administrator) utility provided by the operating system to register the library(s). For more information Support Windows.
  • Create Wrapper: Uses the command line tool Aximp.exe (Windows Forms ActiveX Control Importer, built into Visual Studio) (user administrator) to create a wrapper of these references that can be used in the converted project. For more references go to Microsoft - Axiimp.exe.
  • Link: Open the C# project and update the library references, then compile.