Skip to content

Repo sync for protected CLA branch #6259

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

Merged
merged 5 commits into from
Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/get-started/csharp/tutorial-aspnet-core-ef-step-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ Replace the `<div>` content in *Index.cshtml* with this markup:

Run the application again. You should see that the page now displays the current time, but it's always midnight! That's not right.

![Visual Studio 2019 ASP.NET Core Project in Browser](media/vs-2019/vs2019-app-in-browser.png)
![Screenshot of the application Home page in a browser window. The content of the page reads: "It's 12:00 AM right now on the server!".](media/vs-2019/vs2019-app-in-browser.png)

## Debug the application

Add a breakpoint to the `OnGet` method where we're assigning a value to `Time` and this time start debugging the application.

Execution stops on the line, and you can see that `DateTime.Today` includes the date but the time is always midnight because it doesn't include time data.

![Visual Studio 2019 ASP.NET Core Project in Browser](media/vs-2019/vs2019-breakpoint.png)
![Screenshot showing the code for Index.cshtml.cs in Visual Studio. A breakpoint is set on the line, 'Time = DateTime.Today.ToShortTimeString();'.](media/vs-2019/vs2019-breakpoint.png)

Change it to use `DateTime.Now` and continue executing. The new code for `OnGet` should be:

Expand All @@ -112,7 +112,7 @@ You should now see the actual server time in the browser when you navigate to th
> [!NOTE]
> Your output might differ from the image, since the output format of ToShortDateTimeString depends on the current culture setting. See <xref:System.DateTime.ToShortTimeString>.

![Visual Studio 2019 ASP.NET Core Project in Browser](media/vs-2019/vs2019-app-fixed-in-browser.png)
![Screenshot of the application Home page in a browser window. The content of the page reads: "It's 1:46 AM right now on the server!".](media/vs-2019/vs2019-app-fixed-in-browser.png)

## Next steps

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/csharp/tutorial-aspnet-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ This solution follows the **Razor Page** design pattern. It's different than the

1. View the **About.cshtml** file in the code editor.

![View the About.cshtml file in the Visual Studio code editor](media/csharp-aspnet-razor-aboutcshtml-mycoreapp-code.png)
![Screenshot showing the first ten lines of the About.cshtml file in the Visual Studio code editor.](media/csharp-aspnet-razor-aboutcshtml-mycoreapp-code.png)

1. Choose the **About.cshtml.cs** file.

![Choose the About.cshtml.cs file in the Visual Studio code editor](media/csharp-aspnet-razor-solution-explorer-aboutcshtmlcs.png)

1. View the **About.cshtml.cs** file in the code editor.

![View the About.cshtml file in the Visual Studio code editor](media/csharp-aspnet-razor-aboutcshtmlcs-mycoreapp-code.png)
![Screenshot showing the first 18 lines of the About.cshtml.cs file in the Visual Studio code editor. ](media/csharp-aspnet-razor-aboutcshtmlcs-mycoreapp-code.png)

1. The project contains a **wwwroot** folder that is the root for your website. Expand the folder to view its contents.

Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/csharp/tutorial-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Let's walk through a few common user input errors, locate them in the debugger i

When you try to divide a number by zero, the console app might freeze and then show you what's wrong in the code editor.

![The Visual Studio code editor shows the divide-by-zero error](./media/csharp-console-calculator-dividebyzero-error.png)
![Screenshot of the Visual Studio code editor showing a line highlighted in yellow and an Exception Unhandled error for 'Attempted to divide by zero'.](./media/csharp-console-calculator-dividebyzero-error.png)

> [!NOTE]
> Sometimes, the app doesn't freeze and the debugger won't show a divide-by-zero error. Instead, the app might return an unexpected nonnumeric result, such as an infinity symbol. The following code fix still applies.
Expand Down Expand Up @@ -305,7 +305,7 @@ Let's change the code to handle this error.

Now, when you divide any number by zero, the app will ask for another number. Even better: It won't stop asking until you provide a number other than zero.

![Fixed the divide-by-zero error](./media/csharp-console-calculator-dividebyzero.png)
![Screenshot of the Visual Studio code editor showing the code for the switch statement with the check for entry of a non-zero divisor added.](./media/csharp-console-calculator-dividebyzero.png)

### Fix the "format" error

Expand Down
10 changes: 5 additions & 5 deletions docs/get-started/includes/ide-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Let's dive in and create a simple program.

Visual Studio builds the app, and a console window opens with the message **Hello World!**. You now have a running app!

![Console window](../media/overview-console-window.png)
![Screenshot of the cmd.exe console window showing the output 'Hello Word!' and 'Press any key to continue'.](../media/overview-console-window.png)

1. To close the console window, press any key on your keyboard.

Expand Down Expand Up @@ -261,7 +261,7 @@ Let's dive in and create a simple program.

Visual Studio builds the app, and a console window opens with the message **Hello World!**. You now have a running app!

![Console window](../media/vs-2019/overview-console-window.png)
![Screenshot of the Microsoft Visual Studio Debug Console window showing the output 'Hello Word!' and 'Press any key to close this window'.](../media/vs-2019/overview-console-window.png)

1. To close the console window, press any key on your keyboard.

Expand All @@ -286,7 +286,7 @@ Let's dive in and create a simple program.

1. Enter your name in the console window and press **Enter**.

![Console window](../media/vs-2019/overview-console-input.png)
![Screenshot of the Microsoft Visual Studio Debug Console window showing the prompt for a name, the input, and the output 'Hello Georgette!'.](../media/vs-2019/overview-console-input.png)

1. Press any key to close the console window and stop the running program.

Expand Down Expand Up @@ -360,15 +360,15 @@ First, let's rename the `name` variable:

10. Run the program again by pressing **Ctrl**+**F5**. The output looks something like this:

![Console window with program output](../media/overview-console-final.png)
!Screenshot of the cmd.exe console window showing the prompt for a name, the input, and the output 'Hello Georgette! Day of year: 151'.](../media/overview-console-final.png)

::: moniker-end

::: moniker range=">=vs-2019"

10. Run the program again by pressing **Ctrl**+**F5**. The output looks something like this:

![Console window with program output](../media/vs-2019/overview-console-final.png)
![Screenshot of the Microsoft Visual Studio Debug Console window showing the prompt for a name, the input, and the output 'Hello Georgette! Day of year: 43'.](../media/vs-2019/overview-console-final.png)

::: moniker-end

Expand Down
4 changes: 2 additions & 2 deletions docs/ide/find-and-fix-code-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ For more information about using breakpoints, read [Using breakpoints](../debugg

When your running code hits a breakpoint and pauses, the line of code marked in yellow (the current statement) has not executed yet. At this point, you may want to execute the current statement and then inspect the changed values. You can use several *step* commands to execute code in the debugger. If the marked code is a method call, you can step into it by pressing **F11**. You can also *step over* the line of code by pressing **F10**. For additional commands and details on how to step through code, read [Navigate code with the debugger](../debugger/navigating-through-code-with-the-debugger.md).

![Visual Studio run-time value inspection](../ide/media/vs_ide_gs_debug_hit_breakpoint.png)
![Screenshot of the Visual Studio code window. A red dot in the left gutter indicates a breakpoint at the line of code marked in yellow.](../ide/media/vs_ide_gs_debug_hit_breakpoint.png)

In the preceding illustration, you can advance the debugger one statement by pressing either **F10** or **F11** (since there is no method call here, both commands have the same result).

While the debugger is paused, you can inspect your variables and call stacks to determine what is going on. Are the values in the ranges you expect to see? Are calls being made in the right order?

![Visual Studio run-time value inspection](../ide/media/vs_ide_gs_debug_inspect_value.png)
![Screenshot of the Visual Studio code window. At the line of code marked in yellow, a variable is selected and a dropdown shows its current value and references.](../ide/media/vs_ide_gs_debug_inspect_value.png)

Hover over a variable to see its current value and references. If you see a value you didn't expect, you probably have a bug in the preceding or calling code. For more in-depth debugging information, [learn more](../debugger/debugger-feature-tour.md) about using the debugger.

Expand Down
4 changes: 2 additions & 2 deletions docs/ide/quickstart-aspnet-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Soon after, Visual Studio opens your project file.

1. In the **Solution Explorer**, expand the **Pages** folder, and then choose **About.cshtml**.

![Choose the About.cshtml file from the Solution Explorer](../ide/media/csharp-aspnet-about-page-html-file.png)
![Screenshot of Visual Studio Solution Explorer showing the files in the HelloWorld project. The Pages folder is expanded and About.cshtml is selected.](../ide/media/csharp-aspnet-about-page-html-file.png)

This file corresponds to a page that's named **About** in the web app, which runs in a web browser.

Expand All @@ -134,7 +134,7 @@ Soon after, Visual Studio opens your project file.

1. In the **Solution Explorer**, expand **About.cshtml**, and then choose **About.cshtml.cs**. (This file also corresponds with the **About** page in a web browser.)

![Choose the About.cshtml file from the Solution Explorer](../ide/media/csharp-aspnet-about-page-code-file.png)
![Screenshot of Visual Studio Solution Explorer showing the files in the HelloWorld project. About.cshtml is expanded and About.cshtml.cs is selected.](../ide/media/csharp-aspnet-about-page-code-file.png)

In the editor, you'll see C# code that includes text for the "application description" area of the **About** page.

Expand Down
2 changes: 1 addition & 1 deletion docs/ide/reference/introduce-local-variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This code generation applies to:
- Press **Ctrl**+**.** to trigger the **Quick Actions and Refactorings** menu.
- **Mouse**
- Right-click and select the **Quick Actions and Refactorings** menu.
- Click the ![screwdriver](media/screwdriver.png) icon that appears in the left margin if the text cursor is already on the line with the highlighted expression.
- Click the ![Screenshot of the screwdriver icon that appears in the left margin of the Quick Actions and Refactorings menu.](media/screwdriver.png) icon that appears in the left margin if the text cursor is already on the line with the highlighted expression.

![Introduce local preview](media/local-preview-cs.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The following limitations apply when you re-target your test projects to use ear

4. Use the **Target framework (all configurations)** drop-down list to change the target framework to **.NET Framework 3.5** or a later version as shown in callout B in the following illustration. You should not specify a client version.

![Target framework drop&#45;down list](../test/media/howtoconfigureunitest35frameworkstepb.png)
![Screenshot of the Advanced Compiler Settings dialog. The Target framework drop-down list is highlighted and the value is set to '.NET Frameowrk 3.5'.](../test/media/howtoconfigureunitest35frameworkstepb.png)

## Retargeting for C# unit test projects

Expand All @@ -68,7 +68,7 @@ The following limitations apply when you re-target your test projects to use ear

3. On the **Application** tab, choose **Target framework**. From the drop-down list, choose **.NET Framework 3.5** or a later version, as shown in the following illustration. You should not specify a client version.

![Target framework drop&#45;down list](../test/media/howtoconfigureunittest35frameworkcsharp.png)
![Illustration of the Application tab in the Solution Explorer Properties pane that highlights the location of the Target framework drop-down list.](../test/media/howtoconfigureunittest35frameworkcsharp.png)

## Retargeting for C++/CLI unit test projects

Expand Down
8 changes: 4 additions & 4 deletions docs/test/run-unit-tests-with-test-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can run all the tests in the solution, all the tests in a group, or a set of

- Select the individual tests that you want to run, open the right-click menu for a selected test and then choose **Run Selected Tests**.

- If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![UTE&#95;parallelicon&#45;small](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.
- If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![Screenshot of the Parallel test execution toggle button on the Visual Studio Test Explorer toolbar. When this button is selected, tests will run in parallel.](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.

The **pass/fail bar** at the top of the **Test Explorer** window is animated as the tests run. At the conclusion of the test run, the **pass/fail bar** turns green if all tests passed or turns red if any test failed.
::: moniker-end
Expand Down Expand Up @@ -144,7 +144,7 @@ Test Explorer lets you group your tests into a hierarchy. The default hierarchy

You can define your own levels of the hierarchy and group by **State** and then **Class** for example by selecting Group By options in your preferred order.

![Group by State and then Class](../test/media/vs-2019/test-explorer-groupby-state-16-2.png)
![Screenshot of the Visual Studio Test Explorer showing a test hierarchy in one pane and the Group By menu in the other with the Class and State options checked.](../test/media/vs-2019/test-explorer-groupby-state-16-2.png)
::: moniker-end

### Test Explorer groups
Expand Down Expand Up @@ -201,7 +201,7 @@ You can create and save a list of tests that you want to run or view as a group.

**To open a playlist**, choose **Test** > **Playlist** from the Visual Studio menu, and either choose from the list of recently used playlists, or choose **Open Playlist** to specify the name and location of the playlist.

If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![UTE&#95;parallelicon&#45;small](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.
If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![Screenshot of the Parallel test execution toggle button on the Visual Studio Test Explorer toolbar.](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.
::: moniker-end
::: moniker range=">=vs-2019"
You can create and save a list of tests that you want to run or view as a group. When you select a playlist, the tests in the list are displayed in a new Test Explorer tab. You can add a test to more than one playlist.
Expand Down Expand Up @@ -258,7 +258,7 @@ Use the following format for xUnit. Make sure there is a space between your `Tes

The [groups](#test-explorer-groups) are also available as columns in Test Explorer, along with Trait, Stack Trace, Error Message, and Fully Qualified Name. Most columns are not visible by default, and you can customize which columns you see and the order in which they appear.

![Group by State and then Class](../test/media/vs-2019/test-explorer-columns-16-2.png)
![Screenshot of the Visual Studio Test Explorer showing a menu with Columns selected and a sub-menu with Duration, Traits, and Error Message selected.](../test/media/vs-2019/test-explorer-columns-16-2.png)

### Filter, sort, and rearrange test columns

Expand Down
2 changes: 1 addition & 1 deletion docs/test/unit-test-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ You can choose **Run All** to run all your tests, or choose **Run** to choose a

::: moniker range="vs-2017"

If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![UTE&#95;parallelicon&#45;small](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.
If individual tests have no dependencies that prevent them from being run in any order, turn on parallel test execution with the ![Screenshot of the Parallel test execution toggle button on the Visual Studio Test Explorer toolbar.](../test/media/ute_parallelicon-small.png) toggle button on the toolbar. This can noticeably reduce the time taken to run all the tests.

::: moniker-end

Expand Down
4 changes: 2 additions & 2 deletions docs/test/use-ui-automation-to-test-your-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ If the control you want to select loses focus and disappears when you select the

Sometimes, when you add controls and verify their properties, you might have to use the keyboard. For example, when you try to record a Coded UI test that uses a right-click menu control, the list of menu items in the control will lose focus and disappear when you try to select the **Add Assertions** tool from the **Coded UI Test Builder**. This is demonstrated in the following illustration, where the right-click menu in Internet Explorer loses focus and disappears if you try to select it with the **Add Assertions** tool.

![CodedUITest&#95;SelectControlKeyboard](../test/media/codeduitest_selectcontrolkeyboard.png)
![Screenshot showing the Add Assertions tool in the Coded UI Test builder overlapping the right-click menu from Internet Explorer.](../test/media/codeduitest_selectcontrolkeyboard.png)

To use the keyboard to select a UI control, hover over the control with the mouse. Then hold down the **Ctrl** key and the **I** key at the same time. Release the keys. The control is recorded by the **Coded UI Test Builder**.

Expand All @@ -223,7 +223,7 @@ Under some circumstances, a particular control that's being used in a Coded UI t

When you perform your Coded UI test, hover over the control. Then press and hold **Ctrl**, while you press and hold the **Shift** and **R** keys on your keyboard. Release the keys. A mouse hover event is recorded by the **Coded UI Test Builder**.

![CodedUI&#95;Hover](../test/media/codedui_hover.png)
![Screenshot of the Coded UI Test builder command bar with the Pause icon selected. A tool tip window shows the location of a mouse hover event.](../test/media/codedui_hover.png)

After you generate the test method, code similar to the following example will be added to the *UIMap.Designer.cs* file:

Expand Down
4 changes: 2 additions & 2 deletions docs/xaml-tools/xaml-code-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ For more information about change tracking&mdash;to include the wavy lines (also

When you're editing your code in the XAML code editor, there are several features that you can access by using the right-click context menu. Most of these features are available universally in the Visual Studio IDE, while some are specific to using a code editor along with a Design window.

![The XAML code editor's right-click context menu in Visual Studio](media/xaml-code-editor-right-click-menu.png "Screenshot of the XAML code editor's right-click context menu in Visual Studio 2019")
![Screenshot of the XAML code editor's right-click context menu in Visual Studio 2019.](media/xaml-code-editor-right-click-menu.png)

Here's what each feature does and how it's useful:

Expand All @@ -157,7 +157,7 @@ The scroll bar can do more than scroll through your code. You can also use it to

In the scroll bar of the code editor, there's a **Split** button at the top right. When you choose it, you can open another code editor pane. This is useful because they operate independently of each other, so you can use them to work on code in different locations.

![The XAML code editor, middle pane only, in Visual Studio](media/code-editor-split-window-button.png "Screenshot of the XAML code editor, middle pane only, in Visual Studio 2019")
![Screenshot showing the middle pane of the XAML code editor in Visual Studio 2019 with the Split button highlighted at the top right of the pane.](media/code-editor-split-window-button.png)

For more information about how to split an editor window, see the [Manage editor windows](../ide/how-to-manage-editor-windows.md) page.

Expand Down
Loading