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

前端 未结 7 1081
借酒劲吻你
借酒劲吻你 2020-12-15 18:14

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 i

相关标签:
7条回答
  • 2020-12-15 18:28

    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.

    0 讨论(0)
  • 2020-12-15 18:35

    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.

    0 讨论(0)
  • 2020-12-15 18:43

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

    0 讨论(0)
  • 2020-12-15 18:47

    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!

    0 讨论(0)
  • 2020-12-15 18:47

    You need to create a new solution. File -> New -> Solution.

    That's all.

    0 讨论(0)
  • 2020-12-15 18:48

    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

    0 讨论(0)
提交回复
热议问题