Visual Basic in .NET Core 3.0

Avatar

Kathleen

Visual Basic in .NET Core 3

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.

You can read how .NET Core 3.0 affects C#, ASP.NET, and the .NET Framework.

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:

ScenarioSupported VB in .NET Core 3
WinFormsYes
WPFYes
Console applicationsYes
Windows servicesYes
UAPYes
Test projectsYes

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.

Summary

“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

Avatar
Kathleen Dollard

Follow Kathleen   

Avatar
SuperCocoLoco . 2019-02-28 16:05:58
What has happened with the comments? All deleted.
Avatar
Richard Barnes 2019-03-03 11:01:29
From what I am reading it does not look like asp.net core 3 supports Visual Basic. I understand you want to put a stake in web forms, and I have no issues with that but no web developement in VB at all? Screw this I moving over to Python as my primary web language. WTG Microsoft, VB developer since VB2 who has stuck with you and you finaly broke my back. 
Avatar
Harol Gomez 2019-03-14 10:17:26
I am very sorry to see how the VB.NET language and the programmers that use it are downplayed. Obviously, Vb.Net programmers have had to learn C #, F # and any other language because MS does not deliver timely documentation and examples in VB.NET. Even I wonder "Who will program only WinForms in these times?", "Why not enable at least WEB API for Vb.Net Core ?, is so difficult?". Somebody will program some new system knowing that another language of the same manufacturer will be very advanced in comparison. I think it's a demotivation tactic, so that due to tiredness it simply stops being used without noise and for the joy of someone who surely is not in MS since its inception.