If, like me, you’ve been developing Web APIs in .NET since the days of version 3.5 (or 2, or even 1.1!), then you’ve probably ran into the scenario of having to run multiple instances of Visual Studio to debug a multi-tiered or distributed application. If you’re still doing it to this day, there’s a trick to make life easier on us and on our poor laptops memory: run .NET Core apps from the terminal, even Web APIs!
Open a new terminal and browse to the project folder. From there, just do:
> dotnet run
Yes, simple like that. It triggers a build if the binaries are not present and starts up the application at the preconfigured endpoints. And if you're building .NET apps in Linux or Mac OS (you know you can do that, right?), it works just as well in the Unix terminal.
Bonus tip: If you haven’t tried the new Windows Terminal with tabs and customizable themes, check it out from Microsoft’s official Github page or from the Windows Store. It supports Windows Command Prompt, PowerShell, WSL, Azure and Visual Studio command line APIs.
It’s great to have multiple projects running locally while you work on an issue in one of the application layers. And great for not having to startup the entire Visual Studio suite several times.
What was the highest number of Visual Studio instances you had running on your machine at the same time?
Top comments (0)