This document is archived and information here might be outdated.  Recommended version.


stdole library not added to migrated project (ArcObjects .NET 10.4 SDK)

stdole library not added to migrated project


Summary
Using the Visual Basic Upgrade Wizard in Visual Studio to auto-translate Visual Basic 6 (VB6) code to Visual Basic .NET (VB .NET) is not 100 percent automated. This topic shows ArcGIS developers how to manually correct a project where the stdole library is not added properly after the auto-translation.

About stdole library not added to migrated project

The following is an example VB .NET error:
  • Error 58 Type 'stdole.IUnknown' is not defined.
The following is the cause of the VB .NET error:
  • The VB6 to VB .NET Upgrade Wizard does not correctly detect and add the necessary stdole assembly. To correct this error, add the stdole assembly to your Visual Studio project. See the following screen shot:

The following is the original VB6 code example:
Dim pUnKnown As IUnknown
The following is the auto-translated code to VB .NET:
[VB.NET]
'The initial auto-translated VB .NET conversion is correct. The project needs a reference
'added for stdole.
Dim pUnKnown As stdole.IUnknown


See Also:

Migrating from VB6 to VB.NET
General steps for migrating from VB6 to VB.NET




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit Engine