3 ms·
While there's a thread on F#, I'd like to complain about how I attempted to create/publish a F# dotnet app in entirely using the terminal (i.e. without the bloa
by hd4 3y ago
While there's a thread on F#, I'd like to complain about how I attempted to create/publish a F# dotnet app in entirely using the terminal (i.e. without the bloat of Visual Studio) and it doesn't seem to be supported, which was unfortunate.
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.
- gsuuon 3y ago> dotnet new list Shows all the available templates - you could give mvc or web a try?
- phillipcarter 3y agoThis is, unfortunately, a consequence of the annoying naming Microsoft does (I am allowed to complain about this because I worked on the .NET team -- nobody can name things we can't). 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.
- Smaug123 3y agoThe templates are all listed at https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-n... . You picked a template that is indeed not supported in F#; the F# ecosystem is generally oriented more around the SAFE stack and Fable.