Visual Basic has two lines. The classic line (Visual Basic 1.0 to 6.0, 1991 to 1998) is a COM-based language with the file formats of the previous pages; its dialects live on as VBA and VBScript. The .NET line (version 7 in 2002 to the present) is a different language on the .NET platform. The .NET versions are named by the language version, which is not the same number as the Visual Studio release.
Visual Basic .NET: what each version added
The features of each version come from Roslyn’s table of language-version features (ParserFeature.vb), its keyword table, and the language version history of the dotnet/vblang repository; the Visual Studio releases are those named by that history for 15 and later and the usual ones for the earlier versions.
| Language version | With | New in it |
|---|---|---|
| 7.0, 7.1 | Visual Studio .NET 2002, 2003 | the first .NET Visual Basic: classes with inheritance, structured exception handling, the base class library, Imports, Inherits, Overrides, the shift operators arrived with 7.1 (from memory) |
| 8.0 | Visual Studio 2005 | generics (Of), partial types, operator overloading and conversion operators (Operator, Widening, Narrowing), Using, Continue, IsNot, TryCast, the unsigned types (SByte, UShort, UInteger, ULong and their C… conversions), Global, the My namespace (these keywords are the ones Roslyn marks as new since 7) |
| 9.0 | Visual Studio 2008 | LINQ and query expressions, XML literals and XML member access, lambda expressions, extension methods, local type inference (Option Infer), anonymous types, object initialisers, nullable ?, the If(a, b, c) operator, relaxed delegates |
| 10.0 | Visual Studio 2010 | automatic properties, collection initialisers (From), array literals, implicit line continuation, statement lambdas and Sub lambdas, covariance and contravariance (In, Out) |
| 11.0 | Visual Studio 2012 | Async and Await, Iterator and Yield, Namespace Global |
| 12.0 | Visual Studio 2013 | no new language features are listed for it in the Roslyn table |
| 14.0 | Visual Studio 2015 (the Roslyn compiler) | the null-conditional operators ?. and ?(, NameOf, interpolated strings, read-only automatic properties, multi-line string literals, comments after implicit line continuation, TypeOf … IsNot, year-first date literals, #Disable Warning and #Enable Warning, regions anywhere, partial modules and interfaces, CObj in attribute arguments |
| 15.0 | Visual Studio 2017 | tuples, binary literals (&B), digit separators |
| 15.3 | Visual Studio 2017 version 15.3 | inferred tuple element names |
| 15.5 | Visual Studio 2017 version 15.5 | non-trailing named arguments, Private Protected, a digit separator straight after the base prefix (&H_FF) |
| 16.0 | Visual Studio 2019 | comments after an explicit line continuation (_ ' comment), an unconstrained type parameter in the If(a, b) operator |
| 16.9 | Visual Studio 2019 version 16.9 | use of init-only property setters |
| 17.13 | Visual Studio 2022 version 17.13 | the unmanaged constraint is recognised; overload resolution priority |
The history file also lists, for Visual Studio 2022 and .NET 6, the CallerArgumentExpression attribute, which is not tied to a language version. The compiler accepts /langversion: with these numbers (9, 10, 11, 12, 14, 15, 15.3, 15.5, 16, 16.9, 17.13), default (the latest major version) and latest (the latest version including minor ones). Microsoft announced in 2020 that Visual Basic would remain supported but would no longer get new language features (from memory of the announcement; not checked here), which matches how few features the table lists after 16.
The classic line
| Version | Year | Notes |
|---|---|---|
| Visual Basic 1.0 to 3.0 | 1991 to 1993 | the original forms-based Basic for Windows; forms use VERSION 2.00 and plain control class names (see forms) |
| Visual Basic 4.0, 5.0 | 1995, 1997 | class modules and OLE automation (4.0), the native-code compiler and ActiveX user controls (5.0); VERSION 5.00 forms (all from memory) |
| Visual Basic 6.0 | 1998 | the last classic version: user documents, web classes, the data environment and the Replace, Split and Join functions (from memory); the VB6 runtime is still shipped with Windows (from memory of Microsoft’s support statement) |
| VBA 1 to 6 | 1993 onward | the language of Office macros; VBA 7 (Office 2010) adds 64-bit support (PtrSafe, LongPtr, LongLong, the VBA7 constant) |
| VBScript 1 to 5.8 | 1996 onward | the scripting subset; version 5.x added classes, With, Eval and regular expressions (from memory) |
Not described
Known, not yet covered
- Reference: the years and Visual Studio names of Visual Basic 1.0 to 7.1, VBA, VBScript and the .NET Framework releases were written from memory and were not checked against a source; the features of 9.0 to 11.0 beyond the keyword and parser tables, the full details of each version’s changes and the changes of the runtime library are not listed.
- Reference: the language specification text describes version 11; its differences from later compilers (the features above) are only listed here.
See also
- Tooling – selecting a version with the compiler
- VB6 and VBA