Visual Basic in .NET Core 3.0
Visual Basic in .NET Core 3
Update: March 12, 2020
This strategy described in this 2018 post has been replaced with the one in this post.
Update: Oct 8, 2019
.NET Core 3.0 contains portions of the Visual Basic.NET Runtime (microsoft.visualbasic.dll) that do not depend on WinForms.
Visual Basic.NET support for WinForms, WPF, and other application types in .NET Core 3.0 is similar to C#. Special features of the Visual Basic.NET Runtime (microsoft.visualbasic.dll) are not in .NET Core 3.0. As an example, application startup using application models are not supported. Visual Basic.NET desktop templates are not in .NET Core 3.0 because the Visual Basic.NET experience is lacking these features.
Due to the embedded nature of WinForms in Visual Basic.NET parts of the My subsystem and application models that are not WinForms specific are also not in .NET Core 3.0.
Original Post from Nov 12, 2018
I’m excited about our plans for how Visual Basic.NET will be supported in .NET Core 3.0!
Like other .NET languages, Visual Basic will continue to be supported on .NET Framework, and you do not need to make any changes to your application.
This post covers what these changes mean to Visual Basic.NET for users interested in .NET Core. The short version is:
- Visual Basic.NET compiles and runs on .NET Core today and this will continue
- The familiar Visual Basic Runtime is not yet part of .NET Core, but will be included in .NET Core 3.0
- Visual Basic 16.0 will ship at the same time C# 8.0 ships
- Visual Basic 16.1 and 16.2 will improve C# interop and add new features
Visual Basic Scenarios
“We will focus innovation on the core scenarios and domains where VB is popular.” – From the .NET Languages Strategy
When we look at where Visual Basic development is happening, the majority of VB applications are Windows desktop applications – Windows Forms (WinForms) and WPF. This means our focus for Visual Basic in .NET Core 3 is desktop development.
The scenarios for Visual Basic in .NET Core 3.0 are:
|Scenario||Supported VB in .NET Core 3|
Visual Basic.NET Runtime on .NET Core
“We will do everything necessary to keep it a first class citizen of the .NET ecosystem.” – From the .NET Languages Strategy
Future innovation in .NET will occur on .NET Core 3.0. We are committed to making Visual Basic work well on this platform.
A large part of what makes Visual Basic special is the Visual Basic Runtime. .NET Core 2 contains only the small part of Visual Basic Runtime that is defined in the Visual Basic Language Specification which was initially designed for interop with phones.
The major effort for Visual Basic 16.0 will be moving the Visual Basic Runtime to .NET Core 3.0 to provide expected features like
Mid or the
My namespace. This work will probably not be ready for the first preview of .NET Core 3.0 but will appear in a later preview.
Cross-Language between Visual Basic and C#
“We will keep a focus on the cross-language tooling experience, recognizing that many VB developers also use C#.” – From the .NET Languages Strategy
Many Visual Basic developers also work in C# or work in shops with a combination of Visual Basic and C# code.
Visual Basic.NET on .NET Core will interop with existing C# code in the same great way it does today. Visual Basic 16.1 will include features that improve interop with C# 8.0. As an example, if C# 8.0 supports default interface implementations, we’d plan to add them to Visual Basic.
Features and Futures for Visual Basic.NET
“When API shapes evolve as a result of new C# features, for instance, consuming those APIs should feel natural in VB.” – From the .NET Languages Strategy
Over the last few years, Microsoft has added features to C# and .NET to create better infrastructure and make the tools you use and the applications you write faster. This benefits Visual Basic programmers.
Some of the API changes that support these infrastructure improvements involve things like pointer access to memory or demand significant code changes that aren’t consistent with Visual Basic’s goals of safety and ease of use. Not all APIs in .NET Core will be consumable from Visual Basic.
With exceptions like these, most evolving APIs will be available for Visual Basic and there are several interesting features we will consider for Visual Basic 16.2, including pattern matching.
“We will keep Visual Basic straightforward and approachable.” – From the .NET Languages Strategy
Visual Basic.NET has a dedicated programmer base that includes hundreds of thousands of developers. Microsoft will continue to work on the right balance of stability and innovation for Visual Basic.NET.
As we build out Visual Basic 16.0, I will post more details on this blog. You can watch or participate in Visual Basic Language design on GitHub.
Kathleen Dollard Visual Basic PM