-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Use top level statements and update screenshots #51568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the Visual Studio console app tutorial set to match current templates (top-level statements) and refreshes UI screenshots (dark theme), improving parity with the Visual Studio Code tutorials.
Changes:
- Switches the “create app” tutorial to show the C# top-level statements template and updates related instructions.
- Refreshes publishing and debugging tutorials with updated screenshots, image references, and alt text.
- Adjusts debugging steps (breakpoint UI text, Immediate window inputs, and stepping flow).
Reviewed changes
Copilot reviewed 3 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/core/tutorials/with-visual-studio.md | Updates project creation steps and sample code to top-level statements, and adds an “Additional information” screenshot. |
| docs/core/tutorials/publishing-with-visual-studio.md | Updates screenshot alt text punctuation and adds a screenshot for Show all files. |
| docs/core/tutorials/media/publishing-with-visual-studio/use-release-configuration.png | Adds a Release configuration toolbar screenshot for the publishing tutorial media set. |
| docs/core/tutorials/media/publishing-with-visual-studio/show-all-files.png | Adds a screenshot for the Show all files button in Solution Explorer. |
| docs/core/tutorials/media/publishing-with-visual-studio/publish-page-loc-tab.png | Adds/updates screenshot for the Publish page “Location” tab. |
| docs/core/tutorials/media/publishing-with-visual-studio/publish-context-menu.png | Adds/updates screenshot for the project context menu’s Publish entry. |
| docs/core/tutorials/media/publishing-with-visual-studio/pick-specific-publish-target.png | Adds/updates screenshot for selecting a specific publish target. |
| docs/core/tutorials/media/debugging-with-visual-studio/use-release-configuration.png | Adds/updates Release toolbar screenshot for the debugging tutorial. |
| docs/core/tutorials/media/debugging-with-visual-studio/use-debug-configuration.png | Adds/updates Debug toolbar screenshot for the debugging tutorial. |
| docs/core/tutorials/media/debugging-with-visual-studio/immediate-window-output.png | Adds/updates screenshot showing the Immediate window output. |
| docs/core/tutorials/debugging-with-visual-studio.md | Updates image references and several debugging steps to match the new screenshots and flow. |
| The program displays the string that the user enters. What happens if the user doesn't enter anything? You can test this with a useful debugging feature called a *conditional breakpoint*. | ||
|
|
||
| 1. Right-click on the red dot that represents the breakpoint. In the context menu, select **Conditions** to open the **Breakpoint Settings** dialog. Select the box for **Conditions** if it's not already selected. | ||
| 1. Right-click on the red dot that represents the breakpoint. In the context menu, select **Conditions...** to open the **Breakpoint Settings** dialog. Select the box for **Conditions** if it's not already selected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If an option label ends with a colon or an ellipsis, don't include that end punctuation in instructions."
| The code defines a class, `Program`, with a single method, `Main`, that takes a <xref:System.String> array as an argument. `Main` is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the *args* array. | ||
|
|
||
| C# has a feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) that lets you omit the `Program` class and the `Main` method. This tutorial doesn't use this feature. Whether you use it in your programs is a matter of style preference. | ||
| The code defines a class, `Program`, that calls the <xref:System.Console.WriteLine(System.String)?displayProperty=nameWithType> method to display a message in the console window. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of agree with CCR here. You can't call a method directly from a class, and I don't see where you're defining the class.
Summary
This pull request makes several improvements and updates to the .NET documentation for Visual Studio tutorials. The main focus is on:
Fixes #51448
Internal previews