'VS2022: how to make ASP.NET Core 5 app show it's console window

In VS2019, when I start my ASP.NET Core 5 app, which just exposes an API, if that matters, a console window pops up for that app. There used to be some setting to decide whether to run it as a console / standalone app or host it in IIS Express. I always preferred the console / standalone version because it lets me see the logs in realtime.

In VS2022, when I start the very same project, no window appears at all, and, interestingly, neither do I see IIS Express starting up.

How can I get back to having the project start as a console app? (Except starting it from the command-line and then attaching the debugger.)

UPDATE:

ok, so at long last I noticed that, strangely, a minimized console window is being created and because I start a dozen projects (microservices), I didn't notice before, and procexplorer telling me that the executable had no window added to the confusion. So this is much less problematic, albeit still weird - why does this one particular application not start un-minimized? The only difference it has to all the other executables is that it uses ASP.net core while the others (all background services communicating via messagequeue) don't.

and this only in VS2022, in VS2019 all executables including this one start unminimize



Solution 1:[1]

You have to make sure, that you selected "IIS Express" as your debug profile

VS 2022 debug profile

Solution 2:[2]

I believe you are looking for this. Follow the steps highlighted in in each image:

  • Go to your project properties:

enter image description here

enter image description here

enter image description here

Then you will see that the console is open in the task bar. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 EricW
Solution 2 Imir Hoxha