2

I am want to create a .NET Framework project that has API and MVC parts to it. In Visual Studio there are checkboxes that I can select but in Rider there is nothing, it only allows me to create an MVC project.
I know I can just reinstall Visual Studio and do it from there but I really want to know if there is a way to do this. With .Net Core I can simply add an API controlller bt I don't know how to just add a controller.
If there is a way to add it manually, please tell me!
Rider screenshot: Rider Screenshot As you can see, there is no place to add API. I can't even create a standalone API project!

Status

  • Someone suggested that I create a WebAPI separately and add the config later but I can't even create an API.
  • I looked up how to add an API and it tells you to add one line of config but the code throws errors. The question
samarmohan
  • 350
  • 3
  • 12
  • Did you try creating a separate Web API project, seeing what configuration that does, then applying that configuration to your existing MVC project? You'll learn a lot about what is necessary to get them both working that way. – mason Feb 05 '21 at 15:55
  • But I can't even create a web API project in Rider. I'm thinking of switching back to VS. – samarmohan Feb 05 '21 at 15:56
  • If you like Rider...then why not just use VS to create the project, then you can use Rider to do actual development? – mason Feb 05 '21 at 16:06
  • Lol, I have no space for both of them. :) – samarmohan Feb 05 '21 at 16:08
  • Storage is cheap these days. If you're that storage constrained...get some more storage! – mason Feb 05 '21 at 16:09
  • Would you prefer Rider or VS? I like having one tool and switching would also be annoying for me. I want some opinions. – samarmohan Feb 05 '21 at 16:10
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/228315/discussion-between-samarmohan-and-mason). – samarmohan Feb 05 '21 at 16:12
  • I've never used Rider. And Stack Overflow isn't here to recommend one tool vs the other. I'm not suggesting you constantly switch back and forth. I'm suggesting you create a project with the tool that allows you to create the project, then use whatever you like for your daily development. – mason Feb 05 '21 at 16:13
  • Ok, I think I'll stick with VS but add ReSharper. – samarmohan Feb 05 '21 at 16:16
  • By the way, when I move to .NET Core, I think I will switch to Rider. – samarmohan Feb 05 '21 at 21:29

1 Answers1

4

You can just create it from the type combo:

enter image description here

soydachi
  • 851
  • 1
  • 9
  • 24