BT

InfoQ Homepage News .NET Core 2 Brings Visual Basic to Linux and macOS

.NET Core 2 Brings Visual Basic to Linux and macOS

Bookmarks

Microsoft has moved closer towards bringing Visual Basic into place as a first-class citizen on the .NET Core platform.  As part of the .NET Core 2 release, VB developers can now write console apps and class libraries that target .NET Standard 2.0-- and all are multiplatform compatible.  This means the same executable or library that runs on Windows can work on macOS and Linux.

Once the .NET Core 2 SDK is installed, you will have the ability to start creating VB projects.  Since this is .NET Core, Visual Studio is helpful but not required.  Four VB templates within 2.0:

  • Console Application - sample Hello World app
  • Class Library
  • Unit Test Project
  • xUnit Test Project

From a command prompt, you can run:
dotnet –version

to confirm that you are on .NET Core 2.0 or greater.  Then create a new directory to hold your new project, and run dotnet new to create a new project based on one of the templates.  Then run dotnet run to launch the project:
mkdir vbcore
cd vbcore
dotnet new console -lang VB
dotnet run

    
This doesn't mean that Microsoft's work is done however, as work remains for VB developers on .NET Core to gain the ability to use ASP.NET Core.  Templates for that are in the works per Microsoft’s Immo Landwerth but are not available with this release.  However, VB developers can now write cross-platform code for macOS and Linux, something that was not possible in a supported manner until now.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.