.NET Core (Part 4)

Neil HaddleySeptember 20, 2025

Creating a VB.NET Web App using Microsoft's cross-platform framework.

.NETdotnet

I am able to develop ASP.NET Core applications with the VB.NET language. However, creating a VB.NET ASP.NET Core application is not supported by the dotnet command line app.

BASH
1$ dotnet new web -lang VB -o haddley-web   # fails
2$ dotnet new web -lang C# -o haddley-web   # works
I ran dotnet new web -lang VB -o haddley-web (which fails)

I ran dotnet new web -lang VB -o haddley-web (which fails)

I ran dotnet new web -lang C# -o haddley-web (which works)

I ran dotnet new web -lang C# -o haddley-web (which works)

VB.NET console app

As a workaround I generated a VB.NET console application project and converted it to a VB.NET Web App project.

BASH
1$ dotnet new console -lang VB -o haddley-console
2$ cd haddley-console
3$ dotnet new gitignore
4$ dotnet run
I ran dotnet new console -lang VB -o haddley-console

I ran dotnet new console -lang VB -o haddley-console

I ran dotnet run for the generated console application

I ran dotnet run for the generated console application

I updated the .vbproj file

I updated the .vbproj file

I updated the Program.vb code from "Console.WriteLine(...)"

I updated the Program.vb code from "Console.WriteLine(...)"

...to "WebApplication.CreateBuilder(...)..."

...to "WebApplication.CreateBuilder(...)..."

I ran dotnet run for the Web App

I ran dotnet run for the Web App