Skip to content

Commit b53a195

Browse files
authored
Merge pull request #5818 from MicrosoftDocs/release-16.4
merge release 16.4
2 parents 4b5ce1c + ac65ea6 commit b53a195

14 files changed

+161
-8
lines changed
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Add null checks for all (parameters)
3+
ms.date: 09/17/2019
4+
ms.topic: reference
5+
author: mikadumont
6+
ms.author: midumont
7+
manager: jillfra
8+
dev_langs:
9+
- CSharp
10+
ms.workload:
11+
- "dotnet"
12+
---
13+
# Add null checks for all parameters
14+
15+
This refactoring applies to:
16+
17+
- C#
18+
19+
**What:** Creates and adds `if` statements that check nullity of all the nullable, non-checked parameters.
20+
21+
**When:** You want to quickly add null checks for all applicable method parameters.
22+
23+
**Why:** Writing null checks for many parameters can be time consuming and repetitive. Using this refactoring is quick and makes the program more robust.
24+
25+
## How-to
26+
27+
1. Place your cursor on any parameter within the method.
28+
29+
2. Press **Ctrl**+**.** to trigger the **Quick Actions and Refactorings** menu.
30+
31+
![Quick actions and refactorings](media/add-null-checks-for-all-parameters.png)
32+
33+
3. Select the option to **Add null checks for all parameters**.
34+
35+
![Add null checks for all](media/add-null-checks-for-all.png)
36+
37+
## See also
38+
39+
- [Refactoring](../refactoring-in-visual-studio.md)
Loading
Loading
Loading
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Static local function refactorings
3+
ms.date: 09/28/2019
4+
ms.topic: reference
5+
author: governesss
6+
ms.author: midumont
7+
manager: jillfra
8+
f1_keywords:
9+
- "vs.csharp.refactoring.make.local.function.static"
10+
dev_langs:
11+
- CSharp
12+
ms.workload:
13+
- "dotnet"
14+
---
15+
# Static local function refactorings and Quick Actions
16+
17+
This article outlines two productivity features related to static local functions. One is a refactoring that makes a local function static, and the other is a Quick Action that generates code to pass variables into a static local function.
18+
19+
## Make local function static
20+
21+
This refactoring applies to:
22+
23+
- C#
24+
25+
**What:** Makes a local function static and passes in variables defined outside the function to the function’s declaration and calls.
26+
27+
**When:** You want your local function to be static and for all variables to be defined in the scope of the function.
28+
29+
**Why:** Static local functions improves readability: knowing that specific code is isolated makes it easier to understand, reread, and reuse. Static local functions also provide scoping to prevent polluting a class with a static function that's only called in a single method.
30+
31+
### How-to
32+
33+
1. Place your caret on the local function name.
34+
35+
2. Press **Ctrl**+**.** (period) to trigger the **Quick Actions and Refactorings** menu.
36+
37+
![Make local function static](media/make-local-function-static.png)
38+
39+
3. Select **Make local function ‘static’.**
40+
41+
## Pass variable explicitly in a static local function
42+
43+
This Quick Action applies to:
44+
45+
- C#
46+
47+
**What:** Passes a variable explicitly into a local static function.
48+
49+
**When:** You want a local function to be static but still use variables initialized outside of it.
50+
51+
**Why:** Using static local functions provides clarification to readers because they know that it can only be declared and called in a specific context of the program. It provides the flexibility to define variables outside this context, but still be able to pass them in as arguments to the static local function.
52+
53+
### How-to
54+
55+
1. Place your caret on the variable where it's used in the static local function.
56+
57+
2. Press **Ctrl**+**.** (period) to trigger the **Quick Actions and Refactorings** menu.
58+
59+
![Pass variable explicitly in static local function](media/pass-variable-explicitly-static-local-function.png)
60+
61+
3. Select **Pass variable explicitly in local static function**.
62+
63+
## See also
64+
65+
- [Refactoring](../refactoring-in-visual-studio.md)

docs/ide/whats-new-visual-studio-2019.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "What's new in Visual Studio 2019"
33
titleSuffix: ""
44
description: "Learn about the new features in Visual Studio 2019."
5-
ms.date: 09/24/2019
5+
ms.date: 12/02/2019
66
helpviewer_keywords:
77
- "Visual Studio, what's new"
88
- "what's new [Visual Studio]"
@@ -18,7 +18,7 @@ ms.workload:
1818
---
1919
# What's new in Visual Studio 2019
2020

21-
**Updated for the [16.3 release](/visualstudio/releases/2019/release-notes/)**
21+
**Updated for the [16.4 release](/visualstudio/releases/2019/release-notes/)**
2222

2323
>[!div class="button"]
2424
>[Download Visual Studio 2019](https://visualstudio.microsoft.com/downloads)
@@ -104,7 +104,7 @@ For more information, see the [Better multi-monitor experience with Visual Studi
104104

105105
### .NET Core
106106

107-
**New in 16.3**: We've included support for .NET Core 3.0. Cross-platform, open source—and fully supported by Microsoft.
107+
**New in 16.3**: We've included support for .NET Core 3.0. Cross-platform, open source—and fully supported by Microsoft.
108108

109109
For more information, see the [Announcing .NET Core 3.0](https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/) blog post.
110110

@@ -190,6 +190,12 @@ For more information, see the [Debug live ASP.NET Azure apps using the Snapshot
190190

191191
![A screenshot that shows JavaScript code rendering in a browser](media/vs-2019/edge-chromium-breakpoint.png)
192192

193+
### Pinnable Properties tool
194+
195+
**New in 16.4**: Now, it's easier to can identify objects by their properties while debugging with the new Pinnable Properties tool. Just hover the cursor over a property you want to display in the debugger window of the Watch, Autos, and Locals windows, click the pin icon, and immediately see the information you're looking for at the top of the window!
196+
197+
![An animation that shows how to pin properties in the Visual Studio debugger by using the Pinnable Properties tool](media/vs-2019/debugger-pinnable-properties.gif)
198+
193199
## What's next
194200

195201
We update Visual Studio 2019 often with new features that can make your development experience even better. To learn more about our latest innovations, check out the [Visual Studio Blog](https://devblogs.microsoft.com/visualstudio/). And for a record of what we've released in preview to date, take a look at the [Preview Release Notes](/visualstudio/releases/2019/release-notes-preview/).
@@ -210,4 +216,4 @@ Why send feedback to the Visual Studio team? Because we take customer feedback s
210216
* [What's New in the Visual Studio 2019 SDK](../extensibility/whats-new-visual-studio-2019-sdk.md)
211217
* [Visual Studio 2019 for Mac release notes](/visualstudio/releasenotes/vs2019-mac-relnotes/)
212218
* [Microsoft Build 2019 conference](https://www.microsoft.com/build)
213-
* [Microsoft Connect(); 2018 conference](https://www.microsoft.com/connectevent)
219+
* [Microsoft Connect(); 2018 conference](https://www.microsoft.com/connectevent)

docs/javascript/debug-nodejs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ To attach the debugger from Visual Studio and hit breakpoints in client-side cod
106106

107107
To find the specific code in a transpiled file, use **Ctrl**+**F** (**Edit** > **Find and Replace** > **Quick Find**).
108108

109-
For client-side code, to hit a breakpoint in a TypeScript file or JSX file typically requires the use of [source maps](#generate_source_maps). A source map must be configured correctly to support debugging in Visual Studio.
109+
For client-side code, to hit a breakpoint in a TypeScript file, *.vue*, or JSX file typically requires the use of [source maps](#generate_source_maps). A source map must be configured correctly to support debugging in Visual Studio.
110110

111111
2. Select your target browser as the debug target in Visual Studio, then press **Ctrl**+**F5** (**Debug** > **Start Without Debugging**) to run the app in the browser.
112112

@@ -122,7 +122,6 @@ To attach the debugger from Visual Studio and hit breakpoints in client-side cod
122122
> Starting in Visual Studio 2017, once you attach to the process the first time by following these steps, you can quickly reattach to the same process by choosing **Debug** > **Reattach to Process**.
123123
124124
4. In the **Attach to Process** dialog box, get a filtered list of browser instances that you can attach to.
125-
126125
::: moniker range=">=vs-2019"
127126
In Visual Studio 2019, choose the correct debugger for your target browser, **JavaScript (Chrome)** or **JavaScript (Microsoft Edge - Chromium)** in the **Attach to** field, type **chrome** or **edge** in the filter box to filter the search results.
128127
::: moniker-end

docs/javascript/tutorial-nodejs-with-react-and-jsx.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ For this scenario, use Chrome.
393393

394394
Other browser instances can prevent the browser from opening with debugging enabled. (Browser extensions may be running and preventing full debug mode, so you may need to open Task Manager to find unexpected instances of Chrome.)
395395

396+
::: moniker range=">=vs-2019"
397+
For Microsoft Edge (Chromium), also shut down all instances of Chrome. Because both browsers share the chromium code base, this gives the best results.
398+
::: moniker-end
399+
396400
::: moniker range=">=vs-2019"
397401
For Microsoft Edge (Chromium), also shut down all instances of Chrome. Because both browsers use the chromium code base, this gives the best results.
398402
::: moniker-end
@@ -507,7 +511,6 @@ For this scenario, use Chrome.
507511
* You closed all browser instances, including Chrome extensions (using the Task Manager), so that you can run the browser in debug mode. Make sure you start the browser in debug mode.
508512

509513
* Make sure that your source map file includes a reference to *./app.tsx* and not *webpack:///./app.tsx*, which prevents the Visual Studio debugger from locating *app.tsx*.
510-
511514
Alternatively, if you need to break into code in *app.tsx* and are unable to do it, try using the `debugger;` statement in *app.tsx*, or set breakpoints in the Chrome Developer Tools (or F12 Tools for Microsoft Edge) instead.
512515

513516
* If you need to break into code in *app-bundle.js* and are unable to do it, remove the source map file, *app-bundle.js.map*.

docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Configure unit tests with a .runsettings file"
3-
ms.date: 06/14/2019
3+
ms.date: 10/03/2019
44
ms.topic: conceptual
55
ms.author: jillfra
66
manager: jillfra
@@ -32,12 +32,53 @@ The file appears on the Test Settings menu, and you can select or deselect it. W
3232

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

35+
#### Visual Studio 2019 version 16.3 and earlier
36+
3537
To specify a run settings file in the IDE, select **Test** > **Select Settings File**. Browse to and select the *.runsettings* file.
3638

3739
![Select test settings file menu in Visual Studio 2019](media/vs-2019/select-settings-file.png)
3840

3941
The file appears on the Test menu, and you can select or deselect it. While selected, the run settings file applies whenever you select **Analyze Code Coverage**.
4042

43+
#### Visual Studio 2019 version 16.4 and later
44+
45+
There are three ways of specifying a run settings file in Visual Studio 2019 version 16.4 and later:
46+
47+
- Add a build property to a project through either the project file or a Directory.Build.props file. The run settings file for a project is specified by the property **RunSettingsFilePath**.
48+
49+
- Project-level run settings is currently supported in C#, VB, C++, and F# projects.
50+
- A file specified for a project overrides any other run settings file specified in the solution.
51+
52+
Example of specifying a *.runsettings* file for a project:
53+
54+
```xml
55+
<Project Sdk="Microsoft.NET.Sdk">
56+
<PropertyGroup>
57+
<RunSettingsFilePath>$(SolutionDir)\example.runsettings</RunSettingsFilePath>
58+
</PropertyGroup>
59+
...
60+
</Project>
61+
```
62+
63+
- Place a run settings file named ".runsettings" at the root of your solution.
64+
65+
If auto detection of run settings files is enabled, the settings in this file are applied across all tests run. You can turn on auto detection of runsettings files from two places:
66+
67+
- **Tools** > **Options** > **Test** > **Auto Detect runsettings Files**
68+
69+
![Auto detect runsettings file option in Visual Studio 2019](media/vs-2019/auto-detect-runsettings-tools-window.png)
70+
71+
- **Test** > **Configure Run Settings** > **Auto Detect runsettings Files**
72+
73+
![Auto detect runsettings file menu in Visual Studio 2019](media/vs-2019/auto-detect-runsettings-menu.png)
74+
75+
- In the IDE, select **Test** > **Configure Run Settings** > **Select Solution Wide runsettings File**, and then select the *.runsettings* file.
76+
77+
![Select test solution wide runsettings file menu in Visual Studio 2019](media/vs-2019/select-solution-settings-file.png)
78+
79+
- This file overrides the ".runsettings" file at the root of the solution, if it exists, and is applied across all tests run.
80+
- This file selection only persists locally.
81+
4182
::: moniker-end
4283

4384
### Command line
Loading
Loading
Loading

0 commit comments

Comments
 (0)