简体   繁体   中英

How to bring back IIS Express for Debugging in Visual Studio 2019?

I recently had to unload a project and reload it to fix a bug but now I dont have the option to start my code via IIS express anymore - instead it just says "Any CPU". 在此处输入图像描述

It used to say IIS Express (Google Chrome) and I can launch my web app through that but now it is gone and even going through the Web settings for debugging didn't fix it: 在此处输入图像描述

How can I bring back IIS Express so I can run my code properly again?

Sounds like you need to exit, and then re-load VS. If not, then I would repair it.

I would also consider (yes, I know.!!) a reboot of your computer to flush out any running copy of IIS express.

The setting (choice) of what browser should be to the right in your menu like this: 在此处输入图像描述

So, clicking on that down arrow (chevron) in your start button should drop a list of options to choose which browser.

While I didn't find a solution, and rebooting it didn't work or pressing the chevron drop down button (it didn't show anything), I have learned you can right click the program in the scaffolding, go to debug, and then "start a new instance". This would launch your local host for the web program to run and it works fine.

You can then go to settings and set a hot key /shortcut for it to work which is what I did. While it didn't bring the IIS option back to run, it allows me to run my web program again that way.

I research the issue and found a couple of ways to bring the IIS Express option back.

You could try the approaches below one by one.

Approach-1

In Visual studio 2019, select the solution (.sln)-> Properties . Select the drop-down Single Start-up project . select your project from the dropdown. Click OK .

It should bring back the IIS Express option.

Approach-2

In Visual studio 2019, Go to Tools -> Customize -> Commands tab, then click on the toolbar radio button and choose the standard option from the drop-down and delete one of the existing toolbar inside the standard toolbar and then choose the option reset all .

在此处输入图像描述

Helpful references:

  1. Can't debug asp.net core api in visual studio 2019 (No button IIS Express)

  2. Visual studio 2019 debugging option IISExpress is gone from drop down

  3. IIS Express hidden issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM