Visual Basic 16.9 Support In .NET 5
Written by Kay Ewbank   
Monday, 10 May 2021

Visual Basic support in .NET 5 has been updated, and Visual Basic 16.9 is now supported, along with the ability to use Windows Forms. Microsoft is still firm in its stance that the Visual Basic  language won't get new language features, but Kathleen Dollard Program Manager at Microsoft working on .NET Core CLI and Languages, says that Microsoft is definitely investing in VB.

Earlier versions of .NET Core lacked support for various features of Visual Basic, offering only support for Class Library and Console applications types.

net2

With .NET 5, Visual Basic developers can use the Class Library, Console, Windows Forms, WPF, Worker Service, and ASP.NET Core Web API.

At the time they announced these features would be supported, Microsoft said that:

"Going forward, we do not plan to evolve Visual Basic as a language. This supports language stability and maintains compatibility between the .NET Core and .NET Framework versions of Visual Basic. Future features of .NET Core that require language changes may not be supported in Visual Basic."

Despite these warnings, Microsoft is making features available within .NET 5, including much improved Windows Forms designer support.

Dollard acknowledged that in .NET 3.1, Windows Forms designer worked badly for Visual Basic, largely because the designer was mainly aimed at C#, and VB's event syntax is radically different. The designer has now been overhauled and works correctly with VB.

A second improvement is to the Application Framework, something Klaus Loffelman said is needed if Microsoft is to see a bigger migration wave to .NET. The Application Framework provides VB devs with easy access to resources, managing aspects such as user settings and authentication. It was a major benefit for Visual Basic when Windows Forms first appeared, but until now hasn't been available in .NET Core. The support in VB 16.9 in .NET has now been improved and handles aspects such as modern UI appearance on high DPI systems. 

Visual Basic 16.9 now has support for Default Interface Methods as used in C#8. In C#, this feature can be used to add new methods to interfaces, and while Visual Basic won't be able to create new Default Interface Methods, VB apps will be able to consume them, so as Dollard says, if your app interoperates with a C# app that uses interface method, your app doesn't fail.

Source Generators are also supported for Visual Basic. When Source Generators were added for C#, they were described as allowing C# developers to inspect user code and generate new C# source files that can be added to a compilation. The new support for Visual Basic adds the ability to have code that can be created at compile time and added to the compilation.

 net2

More Information

Visual Studio 16.9 Release Notes

Related Articles

.NET 5 Ready For Action

C# 9 and F# 5 Released With .NET 5

.NET 5 Feature Complete Preview

.NET Is One With .NET 5

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Open Source Key To Expansion of IoT & Edge
13/03/2024

According to the 2023 Eclipse IoT & Edge Commercial Adoption Survey Report, last year saw a surge of IoT adoption among commercial organizations across a wide range of industries. Open source [ ... ]



White House Urges Memory Safe Software
29/02/2024

The White House is urging developers to adopt memory safe programming languages, suggesting Rust would be a safer choice than C or C++. 


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info