How can I build my code? The button start without debugging is disabled

Hans Overbeek 0 Reputation points
2023-01-28T17:43:06.4266667+00:00

I looked about 10 youtube installation of VS 2022 films.

In all the films the installation was succesfully ended with the openeing of the console window with " Hello World" .

Apparently I do something different but I don´t understand what.

Button start without debugging is not activated.

I don´t see the file name in the toolbar.

I can´t build the code.

User's image

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,198 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Reza Aghaei 4,936 Reputation points MVP
    2023-01-28T18:10:04.5933333+00:00

    You need to create a project first. A file (no matter if it's even a complete C# app structure) is not a project in VS point of view, you need a project file.

    Seeing the Attach button, usually means that you have opened Visual Studio without creating a project, and you have only opened a file.

    Just follow these few quick steps:

    1. Open Visual Studio
    2. Choose "Create a new project"
    3. Search for "Console App", and click Next
    4. Specify the name of Project and click Next
    5. Choose framework version, and click Create
    6. After the project created, you can press F5

    There you go!

    Tutorial - Create a .NET console application using Visual Studio

    You can learn more about console applications in the following articles:

    Then if you have any question about a basic template for C# console application, you can take a look at:


  2. Castorix31 81,461 Reputation points
    2023-01-28T18:11:37.53+00:00

    Did you select the right Project Template, like :

    Console_Framework

    0 comments No comments