.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 support by the dotnet command line app.

$ dotnet new web -lang VB -o haddley-web (fails)

$ dotnet new web -lang C# -o haddley-web (works)

dotnet new web -lang VB -o haddley-web (fails)

dotnet new web -lang VB -o haddley-web (fails)

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

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

VB.NET console app

As a workaround I can generate a VB.NET console application project and convert it to a VB.NET Web App project.

$ dotnet new console -lang VB -o haddley-console

$ cd haddley-console

$ dotnet new gitignore

$ dotnet run

dotnet new console -lang VB -o haddley-console

dotnet new console -lang VB -o haddley-console

dotnet run (the generated console application)

dotnet run (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(...)..."

dotnet run (the Web App)

dotnet run (the Web App)