Template for Web API using controllers
Dear all,
maybe I just didn't find it but I'm missing a template to create a Web API solution that uses MVC…
What I mean is producing the same result in Rider as using the following command line:
dotnet new webapi -controllers -f net8.0
Sure, it's not a problem to use the command mentioned above but I just was confused that imho this is the template that is missing in Rider.
Many thanks and best regards,
Christian
Please sign in to leave a comment.
Start from .NET 8, minimal API is the default type when creating new API project with dotnet CLI.
As Rider is using the default parameters of dotnet CLI, the controller-based API project is not considered in .NET 8. You can install more templates in the new solution dialog.
You can create new projects and open them in Rider anytime.
This is something basic that should be included, I think. Anyways, we can create it via the command line, but it's not the ideal way if you have already opened the IDE.
+1 That will be great to have the option in the UI to add the controllers generation.
12345678 In the latest Rider 2024.2 versions, we added Advanced Settings to control parameters passed in dotnet-new CLI. You can generate controller based API project in this way.