Reputation: 408
The question may be a bit idiotic, but I can't find the answer on internet or Microsoft tutorials.
The goal of my project is to build an API to has to run locally on a Windows computer. My API mustn't have an interface or things like that, so I deleted every views and other files like bootstrap or jQuery. Then I call it with Unity.
The API works well, but I always run it with Visual Studio 2019. Is there something like a .exe or a command line to start my API ?
Thank you for your answers ! :)
PS : Yeah I know that an API running locally is quite useless, but with Unity it's really complicated to use things like pipes...
Upvotes: 1
Views: 80
Reputation: 1722
You can host your WebApi application in IIS, so you don't need to run it with Visual Studio.
If you are developing another project, you can ask Visual Studio to run multiple projects during a debugging session. While debuging your unity application, Visual Studio will run your API in the background: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-set-multiple-startup-projects?view=vs-2019
Otherwise, you may self host your asp.net webapi application. There are official Microsoft tutorials on that:
Upvotes: 1