Visual Basic breaking changes

Important

This article is under construction. This is not a complete list of .NET Core breaking changes. For more information on .NET Core breaking changes, you can examine individual breaking changes issues in the dotnet/docs repository on GitHub.

The following is a list of breaking changes in Visual Basic by .NET Core version.

.NET Core 3.0 Preview 8

Microsoft.VisualBasic.Constants.vbNewLine is obsolete

The Microsoft.VisualBasic.Constants.vbNewLine constant is marked Obsolete starting with .NET Core 3.0 Preview 8.

Version introduced

3.0 Preview 8

Change description

Starting with .NET Core 3.0 Preview 8, the Obsolete attribute has been applied to the Microsoft.VisualBasic.Constants.vbNewLine constant. Use of the constant produces a compiler warning. In previous releases of both .NET Core and .NET Framework, it was not marked as obsolete.

This change was made to support Visual Basic as a language for multi-platform development. The vbNewLine constant is equivalent to \r\n, the newline character sequence on Windows. On Unix-based systems, the newline character is \n.

The Obsolete attribute message for vbNewLine includes the following recommendation:

For a carriage return and line feed, use vbCrLf. For the current platform's newline, use Environment.NewLine.

Category

Visual Basic

Affected APIs

.NET Core 3.0 Preview 9

Types in Microsoft.VisualBasic.ApplicationServices namespace not available

The types in the Microsoft.VisualBasic.ApplicationServices namespace are not available.

Version introduced

.NET Core 3.0 Preview 8

Change description

The types in the Microsoft.VisualBasic.ApplicationServices namespace were available in some .NET Core 3.0 Preview releases. They are no longer available starting with .NET Core 3.0 Preview 9.

The types were removed to avoid unnecessary assembly dependencies or breaking changes in subsequent releases.

If your code depends on the use of Microsoft.VisualBasic.ApplicationServices types and their members, you may be able to use a corresponding type or member in the .NET class library. For example, some System.Environment and System.Security.Principal.WindowsIdentity members provide equivalent functionality to the properties of the Microsoft.VisualBasic.ApplicationServices.User class.

Category

Visual Basic

Affected APIs