Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F5 or Start Debugging Button is Greyed Out for Winform application?

Tags:

I know there are many question related to this already on SO but none of them has woked for me till now.

I have a winform application but when I am trying to debug it my Start button is disabled.

Now when I am trying to debug my Start Debugging key is disabled

enter image description here

Things which I have already done are:

1) I have already set my winform application as the Single Start Up project.

2) I have removed the multiple start up project option.

3) I have tried to restart my Visual Studio many times.

4) I have rebuild the application and it is building successfully with no errors.

5) I have build the entire solution and it also build successfuly with no errors.

6) I have checked the sln file and the Format version in it is:

Microsoft Visual Studio Solution File, Format Version 11.00

which I suppose is correct.

like image 782
Rahul Tripathi Avatar asked Mar 14 '14 07:03

Rahul Tripathi


People also ask

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

How do you fix Visual Studio Cannot start debugging because the debug target is missing?

Go to Build > Configuration Manager, and make sure the project has selected the Build. Then rebuild the project and see. If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


2 Answers

Go to the solution Explorer Right click on the solution /Project name and choose set as startup project, it should be enabled.

Go to the solution Explorer Right click on the solution /Project name and choose set as startup project

like image 176
Kamaro Avatar answered Sep 21 '22 21:09

Kamaro


I dont know the reason but this one worked for me. I excluded the project from my solution and then build my solution without it.

And then I again added my project and build my solution and set it as Start Up Application and it has worked for me.

(Truly speaking I really dont understand the reasoning for this!)

like image 27
Rahul Tripathi Avatar answered Sep 21 '22 21:09

Rahul Tripathi