Visual Basic Upgrade Companion Version 8.3 Release Notes Sample Code .

Transcription

Visual Basic Upgrade Companion Version 8.3 Release NotesSample code:All Mobilize.Net sample code is now available on github.VBUC UX EnhancementsSupport for .NET CoreOne of the biggest milestones of this release is providing the first version of migrationsupport for .NET Core 3.1. The value “.NET Core 3.1” is displayed as part of the “.NETPlatform” combo box, and it is only available for C# and Visual Studio 2019.When this option is selected, a new message is displayed on the VBUC’s GUI warning theuser that some upgrade options are disabled because they are not compatible with .NETCore. This is important since, a previously selected value might not be available for .NETCore; in these cases, the VBUC will automatically change the value of that option to thefirst available one. Because of this situation, the Upgrade Options will have to beconfirmed again when changing back/to .NET Core 3.1.

In the image above, the red highlight shows how the disabled options are displayed. Wehave carefully revised the Upgrade Options list to determine which values are notcompatible (yet) with a .NET Core migration. Some of these options are disabledbecause they need a third-party reference that currently does not have a .NET Coreversion. Every disabled case is very specific, but in most cases there is an alternativemethod to provide functionality for .NET Core. Therefore, in future versions we might beable to increase coverage. The following table lists Upgrade Options and identifies onesof them are abailble for .NET Core migrations:Data Access

Upgrade Option Value.NET Core Support?ADODBTo ADO.NET using System.Data.Common and helpers classes ADODBTo ADO.NET using SQL ClientADODBTo COM Interop DAOTo COM Interop DAOTo ADO.NET with helpers based on System.Data.Commons OracleInProcTo COM Interop OracleInProcTo System.DBConnection RDOTo COM Interop RDOTo ADO.NET using SqlClientRDOTo ADO.NET using System.Data.Common and helpers classesSQLDMOTo COM Interop SQLDMOTo Microsoft.SqlServer.Smo GridsUpgrade Option Value.NET Core Support?FPSpreadTo FarPoint Spread helper classFPSpreadTo COM Interop MSDataGridLibTo COM Interop MSDataGridLibTo ComponentOne True DBGrid MSDataGridLibTo System.Windows.Forms.DataGridView

Upgrade Option Value.NET Core Support?MSDBGridLibTo COM Interop MSDBGridLibTo System.Windows.Forms.DataGridView Helper classes MSFlexGridTo COM Interop MSFlexGridTo ComponentOne FlexGridMSFlexGridTo DataGridViewFlex helper classMSFlexGridMSFlexGridToUltraGridTrueDBGridTo COM Interop TrueDBGridTo ComponentOne TrueDBGrid (.Net version) TrueDBGridTo .NET component that extends DataGridView VSFlexGridTo COM Interop VSFlexGridTo ComponentOne FlexGrid MicrosoftUpgrade OptionValue.NET CoreSupport?MSACAL (Microsoft CalendarControl)To COM Interop MSACAL (Microsoft CalendarControl)To System.Windows.Forms.MonthCalendar MSComCtl2 (Microsoft WindowsCommon Controls-2)To COM Interop MSComCtl2 (Microsoft WindowsCommon Controls-2)To native .NET Component(System.Windows.Forms)

Upgrade OptionValue.NET CoreSupport?MSComctl (Microsoft WindowsCommon Controls)To COM Interop MSComctl (Microsoft WindowsCommon Controls)To native .NET Component(System.Windows.Forms) MSComDlg (Microsoft WindowsCommon Dialog Control)To COM Interop MSComDlg (Microsoft WindowsCommon Dialog Control)To native .NET Component(System.Windows.Forms) DataComboTo System.Windows.Forms.ComboBox DataComboTo COM Interop MSMask (Microsoft Mask EditControl)To COM Interop MSMask (Microsoft Mask EditControl)To System.Windows.Forms.MaskedTextBox MSWLess (Microsoft WindowlessControls)To COM Interop MSWLess (Microsoft WindowlessControls)To System.Windows.Forms controls MSXML2 (Microsoft XML)To COM Interop MSXML2 (Microsoft XML)To System.Xml classes RichTextBoxTo COM Interop RichTextBoxTo System.Windows.Forms.RichTextBox SHDocVw (Microsoft InternetControls)To COM Interop

Upgrade OptionValue.NET CoreSupport?SHDocVw (Microsoft InternetControls)To System.Windows.Forms.WebBrowser Shell32To System.Diagnostics Methods Shell32To PInvoke OthersUpgrade OptionValue.NET CoreSupport?AccusoftTo COM Interop AccusoftTo Accusoft.NET Version ActiveBarLibraryTo COM Interop ActiveBarLibraryTo DevExpress.XtraBars C1ElasticTo COM Interop C1ElasticTo ComponentOne controls C1ElasticTo System.Windows.Forms.Panel C1TabTo COM Interop C1TabTo System.Windows.Forms.TabControl COMSVCSLibTo COM Interop COMSVCSLibTo System.EnterpriseServicesCRAXDRT CRVIEWERLibCtl To COM Interop

Upgrade OptionValue.NET CoreSupport?CRAXDRT CRVIEWERLibCtl To CrystalReports CrystalReportTo COM Interop CrystalReportTo CrystalReport.NETCSTextLibTo COM Interop CSTextLibTo ComponentOne C1Input controls CSTextLibTo System.Windows.Forms controls CTTipsTo COM Interop CTTipsTo System.Windows.Forms.ToolTip CWUIControlsLibTo COM Interop CWUIControlsLibTo NationalInstruments LibraryfpBtnAtlLibCtlTo COM Interop fpBtnAtlLibCtlTo System.Windows.Forms.Button ListProTo COM Interop ListProTo System.Windows.FOrms.ComboBox helperclass MemoLibfpMemoTo COM Interop MemoLibfpMemoTo System.Windows.Forms.TextBox MSAccessToNetTo COM Interop MSAccessToNetMSAcessToNET To DotNet Version

Upgrade OptionValue.NET CoreSupport?PictureBoxTo System.Windows.Forms.PictureBox PictureBoxTo System.Windows.Forms.PictureBox helper class PrinterTo .NET Printer helper class PrinterTo PowerPacks helper class ScriptingTo COM Interop ScriptingTo .NET classes TDBDate6To COM Interop TDBDate6To System.Windows.Forms.DateTimePicker TDBTime6To COM Interop TDBTime6To System.Windows.Forms.DateTimePicker TeeChartTo COM Interop TeeChartTo Steema TeeChart for .NET v4 VsPrinterTo COM Interop VsPrinterTo ComponentOne C1PrintPreviewControl helperclassWshRuntimeLibTo COM Interop WshRuntimeLibTo Microsoft.Win32.RegistryKey helper class XArrayTo COM Interop XArrayTo System.Array

Upgrade OptionValue.NET CoreSupport?XArrayDBTo COM Interop XArrayDBTo System.Data.DataTable helper class Code ConversionUpgrade OptionValue.NET CoreSupport?GoSub Conversion (C#)Do not convert GoSub statements GoSub Conversion (C#)Convert GoSub statements to C# local function ActiveX.NET Assemblies with COM VisibleActiveXOut process and Application Domains using Helper classesActiveXStandard .NET Assemblies Generate Auto-ImplementedProperties (C#)On Generate Auto-ImplementedProperties (C#)Off CodeOrganizationRegionsNone CodeOrganizationRegionsOrganize Comment Out Dead CodeOn Comment Out Dead CodeOff Default Property ResolutionStatic code analysis and helper classes Default Property ResolutionStatic code analysis only

Upgrade OptionValue.NET CoreSupport?Error HandlingLeave On Error Statements (VB.NET Only) Error HandlingConvert to Try-Catch Error HandlingTo Try-Catch With Lambdas(C# only) Form LoadFormLoad mechanism upgraded using a helper Form LoadFormLoad event upgraded as a method invoked from form constructorForm LoadFormLoad event upgraded to .NET native eventFree COM bjectsFree COM Objects memory using helperFree COM bjectsFree COM Objects memory manually Late Binding ResolutionStatic code analysis helper classes Late Binding ResolutionStatic code analysis only Late Binding ResolutionStatic code analysis dynamic variables Line And ShapeHelper class Line And ShapePowerPack and Helper class Mid/Left/Right StringsFunctionsHelper class functions Mid/Left/Right StringsFunctionsNative .NET System.String class functions Mid/Left/Right StringsFunctionsSupport function amespaceGenerate SkeletonsOn

Upgrade OptionValue.NET CoreSupport?Generate SkeletonsOff Stubs GenerationUpgrade Stubs generation for non upgraded element Stubs GenerationUpgrade Note indicating not updated elements duringupgrade process Remove Unused LocalVariablesOn Remove Unused LocalVariablesOff VBA.Collection ConversionTo Microsoft.VisualBasic.Collection support class VBA.Collection ConversionTo tive .NET class SheridanUpgrade OptionValue.NET Core Support?SSActiveTabPanelTo COM Interop SSActiveTabPanelTo System.Windows.Forms.TabControl SSActiveToolBarsTo COM Interop SSActiveToolBarsTo System.WIndows.Forms.ToolStrip SSActiveTreeViewTo COM Interop SSActiveTreeViewTo System.Windows.Forms.TreeView SSCalendarWidgetsTo COM Interop

Upgrade OptionValue.NET Core Support?SSCalendarWidgetsTo System.Windows.Forms Controls SSDataWidgets BTo COM Interop SSDataWidgets BTo Infragistics UltraSuite(.NET Version) SSDataWidgets BTo ComponentOne (.NET Version) SSDesignerWidgetsTabsTo COM Interop SSDesignerWidgetsTabsTo System.Windows.Forms.TabControl SSListBarTo COM Interop SSListBarTo Infragistics UltraWinListBar.NET SuiteConvert Empty SSPanels To LabelsOn Convert Empty SSPanels To LabelsOff SSSplitterTo COM Interop SSSplitterTo System.Windows.Forms.SplitContainer ThreedTo COM Interop ThreedTo System.Windows.Forms Controls Upgrade Options view improved. VBUC 8.3 now offers the possibility to only show theUpgrade Options in use for the current migration solution. Now you don’t have to scrollthrough all Upgrade Options available, looking for the ones that actually impact theconverted code. Some Upgrade Options, like the ones in the “Grids” category, will onlyhave effect on the output code, if a reference to a specific component is found on theVB6 code; if so, the green check image is shown for that particular option. The VBUC willselect by default the value “In use”, which will filter out the options for which noreference is found. The options of the “CodeConversion” category are always shown,because their scope is bigger and their activation does not require a reference to befound; the same thing happens for “Extensibility” upgrade options.

You can always select the value “All” to display the complete list of Upgrade Optionsavailable. New .NET Platform combo box available. VBUC 8.3 allows the user to select a specific.NET Platform for its output code. On previous versions, a specific .NET Framework valuewas automatically selected when the Visual Studio Version was chosen. Now, these twoparameters are separated, providing more freedom to the user.

Helpers available as nugetsFor migrations targeting .NET Framework 4.7.2 and later, VBUC 8.3 offers “Nugets” asHelpers Integration mode. Via CMD, you can specify the nuget version desired;otherwise the VBUC will generate a stable version. Logging level mechanismThe VBUC’s logging mechanism has been improved to support different levels. Frommost to least verbose, VBUC 8.3 offers the following levels:o Debug, highly detailed tracing used by application developers.o Info, (selected by default) informational messages that might make sense to endusers and system managers, and highlight the progress of the application.o Warning, potentially harmful situations of interest to end users or systemmanagers that indicate potential problems.o Error, error events of considerable importance that will prevent normal programexecution, but might still allow the application to continue running.

Other Improvements Improved TrueDBGrid to Component One mappings.Improved Visual Studio installation-detection, by default VS2019 is selected.Fixes over foreach iterators.Improved typing of multi-dimensional arrays.

SQLDMO To Microsoft.SqlServer.Smo . VB6 code; if so, the green check image is shown for that particular option. The VBUC will select by default the value "In use", which will filter out the options for which no reference is found. The options of the "CodeConversion" category are always shown,