question

AekchaiGlomjitjarern-2844 avatar image
0 Votes"
AekchaiGlomjitjarern-2844 asked DuaneArnold-0443 answered

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

Please help me!!!! I installed visual studio 2019 community program and trying to build an api project. How can i test the result. IIS Express button not showing or tell me how to run it to see the result thank you very much

windows-server-iisdotnet-aspnet-core-webapi
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Since you installed the latest VS2019, IIS Express should no longer be the default profile in launchSettings.json https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-5.0#development-and-launchsettingsjson But in general that's not an issue at all. You can continue debugging on Kestrel, or switch to IIS Express manually.

0 Votes 0 ·
SamWu-MSFT avatar image
2 Votes"
SamWu-MSFT answered

Hi @AekchaiGlomjitjarern-2844

Is there no IIS Express button in your visual studio 2019?

115741-capture.png


If so, you can try the following two methods to solve your problem:

  • Go to Tools->Customize->Commands then click on toolbar tab and chhose standard option and delete one of the existing toolbar inside standard toolbar and then choose option reset all.

  • Selecting Properties from the solution menu, then in the Startup project menu, choose Single startup project radio button, and from the drop-down list select the Project that corresponds to your web application. After applying the change, in the toolbar you should see the "IIS Express" button re-appear.


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



capture.png (7.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AekchaiGlomjitjarern-2844 avatar image
0 Votes"
AekchaiGlomjitjarern-2844 answered SamWu-MSFT commented

115866-image.png


I think the installation of the program is incomplete or not? I can't run it to see the results.


image.png (30.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AekchaiGlomjitjarern-2844 Your project is complete, it seems that the way you opened your project is wrong. You should right click on the solution and then open with visual studio.

0 Votes 0 ·
DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered

The link should help you. Most likely, you don't have the project setup for debugging for ASP.NET Core.

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2017

Whatever you are trying to debug, enter the URL to the controller action method in the browser's address bar.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.