A few minutes ago we made new build 1.00.05 is available to registered VB Migration Partner customers.  This new release has a few relatively minor yet interesting new features, including

  • expressions such as "Not x Is SomeObject" are now refactored using the IsNot operator
  • the AddSourceFile pragma supports linked files, so that multiple projects can share a single file (corresponds to the Add As Link command when you add an existing file to a VS project)
  • variables that weren't explicitly declared in VB6 code are marked with a new warning (#05B1)
  • support for UserControls with DefaultCancel property set to true are now supported (these are user controls that behave like pushbuttons and expose Default and Cancel properties)
  • a few helper methods to convert to/from StdFont and StdPicture objects have been added
  • unnecessary Exit Sub/Function/Property statements (e.g. those that precede End Sub/Function/Property) are removed from the VB.NET code
  • detection of unused code has been improved: for example, portions of code following a label that isn't referenced by any Goto/Gosub/On Error statement is correctly marked as unreachable
  • code analsysis engine has been improved too, and now recognizes more cases when a ByRef parameter can be safely converted using the ByVal keyword
  • The AxWrapperGen tool has been greatly improved - it now generates code for all properties and methods, emits more precise warnings and TODO remarks, works with ActiveX controls that generate multiple type libraries.
  • UTF-8 encoding is now used for project and *.vb files, improving the compatibility with non-Latin alphabets
  • the PreProcess and PostProcess pragmas have been extended to support a scope parameter

The last feature is extremely useful to narrow the scope of PreProcess and PostProcess pragmas. For illustration purposes, let's see how you can remark out all On Error statement if they occur inside a Property ... End Property block:

    '## PostProcess "[ t]*On Error", " ' ${0}", True, "Property.+?End Property"

As it happens with all new builds, we also fixed a few minor bugs, 22 of them to be precise. You can get more details in the VersionHistory.txt file.