Share via


Microsoft.VisualBasic.Compatibility.VB6.<member> is obsolete and supported within 32 bit processes only

In prior versions of Visual Studio .NET, an upgrade wizard was provided to upgrade projects created in Visual Basic 6.0. As a part of the upgrade process, the wizard used the Microsoft.VisualBasic.Compatibility namespaces to provide functionality that was not available in version 1.0 of the .NET Framework.

Visual Studio 2010 no longer includes the ability to upgrade Visual Basic 6.0 applications, and in version 4 of the .NET Framework all members in these namespaces are marked as obsolete.

What this means is that the Compatibility namespaces may not be included in future versions of the .NET Framework. Although this has no impact on your application in Visual Studio 2010, it could cause breaking changes in your application in future versions of Visual Studio.

In addition, Visual Basic 6.0 and the Compatibility namespaces were intended to target 32 bit platforms. Calling the Compatibility namespaces from a 64 bit process is unsupported and could cause unpredictable results.

There are several options for dealing with this warning.

Change the target framework version

Update code that references the Compatibility namespaces

  • Functions in the Compatibility namespaces were created to work around shortcomings in version 1.0 of the .NET Framework. In most cases, functionality added in later framework versions can be used to rewrite the functions, resulting in improved performance.

    Note

    For the latest information on updating Visual Basic 6.0 code visit the Visual Basic 6.0 Resource Center https://go.microsoft.com/fwlink/?LinkID=186768.

Ignore the warning

  • The warning has no impact on your application in Visual Studio 2010. If you do not intend to upgrade the application to future versions of Visual Studio or simply want to defer your decision, do nothing.

    While no decision has been made, it is possible that the assembly containing the Compatibility namespace could be removed from a future version of the .NET Framework redistributable. This could require you to package the assembly separately and redistribute it with your application.

See Also

Tasks

How to: Optimize an Application for a Specific CPU Type