none
Play button replaced with Attach

    Question

  • I've been working in Visual Studio, making a C# game, but I've run into a problem. The Play button has suddenly been changed to an Attach button. I'm not sure what to do here, and I can't run my program until I can fix it. Please help!
    Wednesday, March 16, 2016 4:00 PM

Answers

  • Hi RetroNuva10,

    According to your screenshot, there doesn't have projects under your solution. And the Program.cs that you opened also doesn't under the solution. The common solution structure should shown as below image.

    Please right-click your solution in Solution Explorer and choose Add -> Existing Project to add your game project into current solution. If there has .sln file in your game project folder, please open the .sln file with Visual Studio directly, which will open all projects that under this solution.

    Then select the project which can set as Startup Project, the Attach button will become Start button for your project.

    Best Regards,
    Weiwei

    • Marked as answer by RetroNuva10 Friday, March 18, 2016 3:38 AM
    Friday, March 18, 2016 2:08 AM
    Moderator

All replies

  • Let's see if this helps first...

    Right click your project in the solution explorer and select Set as StartUp Project.

    Thursday, March 17, 2016 2:27 AM
  • I'm not sure what you mean. This is what is shown when I do that:

    Thursday, March 17, 2016 9:57 PM
  • Hi RetroNuva10,

    According to your screenshot, there doesn't have projects under your solution. And the Program.cs that you opened also doesn't under the solution. The common solution structure should shown as below image.

    Please right-click your solution in Solution Explorer and choose Add -> Existing Project to add your game project into current solution. If there has .sln file in your game project folder, please open the .sln file with Visual Studio directly, which will open all projects that under this solution.

    Then select the project which can set as Startup Project, the Attach button will become Start button for your project.

    Best Regards,
    Weiwei

    • Marked as answer by RetroNuva10 Friday, March 18, 2016 3:38 AM
    Friday, March 18, 2016 2:08 AM
    Moderator
  • Thanks a ton! That fixed it.
    Friday, March 18, 2016 3:38 AM