Unsupported assemblies on .NET Core and .NET 5

Please keep in mind that there are breaking changes between .NET Framework and new .NET Platforms like .NET Core and .NET 5. Some of them can be found on the following links:

Most of these breaking changes happen because existing (Microsoft internal and third party) assemblies for .NET Framework are not available for .NET Core/NET 5. Some of them will be ported to these new platforms in the future, and some of them will not.

Because of that, some of the Upgrade Options the VBUC provides must be disabled when targeting these new platforms. This information is available here. As Microsoft and other third-party companies release more assemblies available for these new .NET platforms, we can enable more Upgrade Options for these targets.

Because of this same reason, we have reviewed our internal mappings that target these unavailable assemblies and we have changed most of them to apply only if the selected platform has support. However, because of the complexity that involves migrating VB6 code to .NET, there might still be a few of these mappings that generate references to unsupported assemblies. We will continue to update the VBUC in order to increase the coverage support for all these libraries.

Here are some of these issues regarding unsupported assemblies.

Issues on both .NET Core and .NET 5

VB.Form/Control/UserControl.ZOrder

The z-order determines which controls are in front of other controls. Most uses of this function are supported in .NET via “SendToBack” and “BringToFront” method calls. Nevertheless, there can be some atypical uses of the “ZOrder” function in VB6 that can only be accomplished via the “Microsoft.VisualBasic.Compatibility.VB6.Support.ZOrder” function in .NET, and this method is not available in .NET Core nor in .NET 5.

VB.App.hInstance

Returns the instance handle of the application. The equivalent function is "Microsoft.VisualBasic.Compatibility.VB6.Support.GetHInstance" which is not available for .NET Core or .NET 5.

VB.Screen.ActiveControl

Returns the control that has focus. The equivalent function is "Microsoft.VisualBasic.Compatibility.VB6.Support.GetActiveControl" which is not available for .NET Core or .NET 5.

VB.Form.WhatsThisMode

Causes the mouse pointer to change to the What's This pointer and prepares the application to display Help on a selected object. The equivalent function is "Microsoft.VisualBasic.Compatibility.VB6.Support.WhatsThisMode” which is not available for .NET Core or .NET 5.

VB.Form.ValidateControls

The ValidateControls method was used to force the Validate event for the control that has focus when a form is closed. The equivalent function is "Microsoft.VisualBasic.Compatibility.VB6.Support.ValidateControl” which is not available for .NET Core or .NET 5.

Issues only in .NET Core

VBA.Interaction.GetObject

This function in VB6 returns the reference to an object provided by an Activex component. In .NET the equivalent function uses the “System.Runtime.InteropServices” assembly. However, some functions of this assembly are not available in .NET Core and therefore some cases of this function are not mapped.

VBA.Interaction.AppActivate

The function activates an application that is already running. This method brings an application’s active window into focus. Typically, it is used when the handle or reference to the active window is unknown. The method in .NET that offers this functionality is “Microsoft.VisualBasic.Interaction.AppActivate”. However, this is not available for .NET Core.

VBA.Interaction.Choose

This function selects and returns a value from a list of arguments. In .NET, an array would typically be used to accomplish this functionality. Nevertheless, there is a compatibility method with the same name available in the “Microsoft.VisualBasic.Interaction” library, but it is not available for .NET Core.

VBA.Interaction.DeleteSetting

This function removes (or deletes) a key or section from the registry. The equivalent .NET statement is “Microsoft.VisualBasic.Interaction.AppActivate” which is not available in .NET Core.

VBA.Interaction.GetAllSetting

Returns the list of key settings and their values from the registry (Variant). The equivalent .NET statement is “Microsoft.VisualBasic.Interaction.GetAllSettings” which is not available in .NET Core.

VBA.Interaction.Partition

Returns a string indicating which particular range it falls into (String). The equivalent .NET statement is “Microsoft.VisualBasic.Interaction.Partition” which is not available in .NET Core.

Last updated