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

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!)


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