dotnet new webapp -lang F# -o MyFSharpWebApp -f net8.0
was the command I used. This was in Windows 10. I'll probably attempt it again in WSL2 when I have time, though I'm not expecting better results. dotnet new webapp -lang F# -o MyFSharpWebApp -f net8.0
was the command I used. This was in Windows 10. I'll probably attempt it again in WSL2 when I have time, though I'm not expecting better results.You'll note that in the list of default templates:
ASP.NET Core Empty web [C#],F# Web/Empty
ASP.NET Core gR... grpc [C#] Web/gRPC
ASP.NET Core We... webapi [C#],F# Web/WebAPI
ASP.NET Core We... webapp,razor [C#] Web/MVC/Razor Pages
ASP.NET Core We... mvc [C#],F# Web/MVC
ASP.NET Core wi... angular [C#] Web/MVC/SPA
ASP.NET Core wi... react [C#] Web/MVC/SPA
"webapp" is actually a flavor of MVC with Razor Pages to define the UI, which is itself a flavor of UI that's different from the typical HTML/JS/react setup most people use.
I think the cleanest way to do web development with .NET is to leave .NET-isms out of the UI (.NET UI is, ironically, its weakest link now) and keep it on the server.
Shows all the available templates - you could give mvc or web a try?