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
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.
Go to the solution Explorer Right click on the solution /Project name and choose set as startup project, it should be enabled.
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!)
Just to add more information to user3414693's post it's possible there is a problem in the solution file such as referencing a project that doesn't exist or has had its name changed.
Unloading and reloading the project will recreate this file with the correct information potentially solving the problem.
In my case I excluded the project from my solution and close my Solution. When Open again, The Solution change configuration (F4) to Debug|Mixed Platforms (I don't change manually).
Then I changed to Debug|Any CPU and works for me!
I have also found that you need to make sure you open up the .sln file in Visual Studio, so that the Solution Explorer displays all the relevant projects. If you open just one of the individual source files, it will not have a context in which to run the program.
Go to your "Solution Propery Pages"
in StartUp Project make sure that if you have "multiple startup projects" selected that you have at least some of those projects available turned on. If there are non active. You will not be allowed to Debug or start your project.
You need to create a new solution. File -> New -> Solution.
That's all.