You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/docker/building-net-docker-images.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ When developing, building, and running containerized applications, we have diffe
42
42
* .js and .css files
43
43
44
44
45
-
The reason to include the `dotnet publish` command output in your production image is to keep its' size to a minimum.
45
+
The reason to include the `dotnet publish` command output in your production image is to keep its size to a minimum.
46
46
47
47
Some .NET Core images share layers between different tags so downloading the latest tag is a relatively lightweight process. If you already have an older version on your machine, this architecture decreases the needed disk space.
Copy file name to clipboardExpand all lines: docs/core/tutorials/consuming-library-with-visual-studio.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
-
title: Consuming a class library with .NET Core in Visual Studio 2017
2
+
title: Consuming a .NET Standard library in Visual Studio 2017
3
3
description: Learn how to call the members in a class library with Visual Studio 2017.
4
4
author: BillWagner
5
5
ms.author: wiwagn
6
-
ms.date: 08/07/2017
6
+
ms.date: 06/05/2018
7
7
dev_langs:
8
8
- "csharp"
9
9
- "vb"
10
10
---
11
11
12
-
# Consuming a class library with .NET Core in Visual Studio 2017
12
+
# Consuming a .NET Standard library in Visual Studio 2017
13
13
14
-
Once you've created a class library by following the steps in [Building a C# class library with .NET Core in Visual Studio 2017](./library-with-visual-studio.md) or [Building a Visual Basic class library with .NET Core in Visual Studio 2017](vb-library-with-visual-studio.md), tested it in [Testing a class library with .NET Core in Visual Studio 2017](testing-library-with-visual-studio.md), and built a Release version of the library, the next step is to make it available to callers. You can do this in two ways:
14
+
Once you've created a .NET Standard class library by following the steps in [Building a C# class library with .NET Core in Visual Studio 2017](./library-with-visual-studio.md) or [Building a Visual Basic class library with .NET Core in Visual Studio 2017](vb-library-with-visual-studio.md), tested it in [Testing a class library with .NET Core in Visual Studio 2017](testing-library-with-visual-studio.md), and built a Release version of the library, the next step is to make it available to callers. You can do this in two ways:
15
15
16
16
* If the library will be used by a single solution (for example, if it's a component in a single large application), you can include it as a project in your solution.
17
17
@@ -44,7 +44,7 @@ Just as you included unit tests in the same solution as your class library, you
The code uses the [Console.WindowHeight](xref:System.Console.WindowHeight) property to determine the number of rows in the console window. Whenever the [Console.CursorTop](xref:System.Console.CursorTop) property is greater than or equal to the number of rows in the console window, the code clears the console window and displays a message to the user.
47
+
The code uses the `row` variable to maintain a count of the number of rows of data written to the console window. Whenever it is greater than or equal to 25, the code clears the console window and displays a message to the user.
48
48
49
49
The program prompts the user to enter a string. It indicates whether the string starts with an uppercase character. If the user presses the Enter key without entering a string, the application terminates, and the console window closes.
50
50
@@ -74,7 +74,7 @@ Just as you included unit tests in the same solution as your class library, you
The code uses the [Console.WindowHeight](xref:System.Console.WindowHeight) property to determine the number of rows in the console window. Whenever the [Console.CursorTop](xref:System.Console.CursorTop) property is greater than or equal to the number of rows in the console window, the code clears the console window and displays a message to the user.
77
+
The code uses the `row` variable to maintain a count of the number of rows of data written to the console window. Whenever it is greater than or equal to 25, the code clears the console window and displays a message to the user.
78
78
79
79
The program prompts the user to enter a string. It indicates whether the string starts with an uppercase character. If the user presses the Enter key without entering a string, the application terminates, and the console window closes.
The .NET Core 2.1.300 SDK, the tooling included with .NET Core 2.1, includes the following changes and enhancements:
21
+
The .NET Core 2.1 SDK (v 2.1.300), the tooling included with .NET Core 2.1, includes the following changes and enhancements:
22
22
23
23
### Build performance improvements
24
24
@@ -43,7 +43,9 @@ A number of tools that were available only on a per project basis using [`Dotnet
43
43
```console
44
44
dotnet watch -- --verbose build
45
45
```
46
-
46
+
47
+
Note the `--` option that precedes the `--verbose` option. It delimits the options passed directly to the `dotnet watch` command from the arguments that are passed to the child `dotnet` process. Without it, the `--verbose` option applies to the `dotnet watch` command, not the `dotnet build` command.
48
+
47
49
For more information, see [Develop ASP.NET Core apps using dotnet watch](/aspnet/core/tutorials/dotnet-watch)
48
50
49
51
-`dotnet dev-certs` generates and manages certificates used during development in ASP.NET Core applications.
Once installed, the tool can be run from the command line by specifying the tool name. For more information, see [.NET Core Global Tools overview](../tools/global-tools.md).
68
70
69
-
### Single-source tool management with the `dotnet tool` command
71
+
### Tool management with the `dotnet tool` command
72
+
73
+
In .NET Core SDK 2.1 (v 2.1.300), all tools operations use the `dotnet tool` command. The following options are available:
70
74
71
-
In .NET Core 2.1, all tools operations use the `dotnettool` command. The following options are available:
75
+
-[`dotnet tool install`](../tools/dotnet-tool-install.md) to install a tool.
72
76
73
-
-`dotnet tool install` to install a tool.
77
+
-[`dotnet tool update`](../tools/dotnet-tool-update.md) to uninstall and reinstall a tool, which effectively updates it.
74
78
75
-
-`dotnet tool update` to uninstall and reinstall a tool, which effectively updates it.
79
+
-[`dotnet tool list`](../tools/dotnet-tool-list.md) to list currently installed tools.
76
80
77
-
-`dotnet tool list` to list currently installed tools.
81
+
-[`dotnet tool uninstall`](../tools/dotnet-tool-uninstall.md) to uninstall currently installed tools.
78
82
79
83
## Roll forward
80
84
81
-
All .NET Core applications starting with the .NET Core 2.0 automatically roll forward to the latest *minor version* installed on a system. That is, if the .NET Core version that an application was built with is not present, the application runs against the latest installed minor version. In other words, if an application is built with .NET Core 2.0 and .NET Core 2.0 itself is not present on the host system but .NET Core 2.1 is, the application runs with .NET Core 2.1.
85
+
All .NET Core applications starting with the .NET Core 2.0 automatically roll forward to the latest *minor version* installed on a system.
86
+
87
+
Starting with .NET Core 2.0, if the version of .NET Core that an application was built with is not present at runtime, the application automatically runs against the latest installed *minor version* of .NET Core. In other words, if an application is built with .NET Core 2.0, and .NET Core 2.0 is not present on the host system but .NET Core 2.1 is, the application runs with .NET Core 2.1.
82
88
83
89
> [!IMPORTANT]
84
90
> This roll-forward behavior doesn't apply to preview releases. Nor does it apply to major releases. For example, a .NET Core 1.0 application wouldn't roll forward to .NET Core 2.0 or .NET Core 2.1.
85
91
86
92
You can also disable minor version roll forward in any of three ways:
87
93
88
-
- Set the `DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX` environment variable equal to 0,
94
+
- Set the `DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX` environment variable to 0.
89
95
90
96
- Add the following line to the runtimeconfig.json file:
91
97
@@ -103,31 +109,43 @@ You can also disable minor version roll forward in any of three ways:
103
109
104
110
### Self-contained application servicing
105
111
106
-
`dotnet publish` now publishes self-contained applications with a serviced runtime version. When you publish a self-contained application with the .NET Core 2.1 SDK, your application includes the latest serviced runtime version known by that SDK. When you upgrade to the latest SDK, you’ll publish with the latest .NET Core runtime version. This applies for .NET Core 1.0 runtimes and later.
112
+
`dotnet publish` now publishes self-contained applications with a serviced runtime version. When you publish a self-contained application with the .NET Core 2.1 SDK (v 2.1.300), your application includes the latest serviced runtime version known by that SDK. When you upgrade to the latest SDK, you’ll publish with the latest .NET Core runtime version. This applies for .NET Core 1.0 runtimes and later.
107
113
108
114
Self-contained publishing relies on runtime versions on NuGet.org. You do not need to have the serviced runtime on your machine.
109
115
110
-
Using the .NET Core 2.0 SDK, self-contained applications are published with the .NET Core 2.0.0 runtime unless a different version is specified via the `RuntimeFrameworkVersion` property. With this new behavior, you’ll no longer need to set this property to select a higher runtime version for a self-contained application. The easiest approach going forward is to always publish with .NET Core 2.1 SDK.
116
+
Using the .NET Core 2.0 SDK, self-contained applications are published with the .NET Core 2.0.0 runtime unless a different version is specified via the `RuntimeFrameworkVersion` property. With this new behavior, you’ll no longer need to set this property to select a higher runtime version for a self-contained application. The easiest approach going forward is to always publish with .NET Core 2.1 SDK (v 2.1.300).
111
117
112
118
## Windows Compatibility Pack
113
119
114
120
When you port existing code from the .NET Framework to .NET Core, you can use the [Windows Compatibility Pack](https://www.nuget.org/packages/Microsoft.Windows.Compatibility). It provides access to 20,000 more APIs than are available in .NET Core. These APIs include types in the <xref:System.Drawing?displayProperty="nameWithType"> namespace, the <xref:System.Diagnostics.EventLog> class, WMI, Performance Counters, Windows Services, and the Windows registry types and members.
115
121
116
122
## JIT compiler improvements
117
123
118
-
.NET Core incorporates a new JIT compiler technology called *tiered compilation* (also known as *adaptive optimization*) that can significantly improve performance.
124
+
.NET Core incorporates a new JIT compiler technology called *tiered compilation* (also known as *adaptive optimization*) that can significantly improve performance. Tiered compilation is an opt-in setting.
119
125
120
126
One of the important tasks performed by the JIT compiler is optimizing code execution. For little-used code paths, however, the compiler may spend more time optimizing code than the runtime spends running unoptimized code. Tiered compilation introduces two stages in JIT compilation:
121
127
122
128
- A **first tier**, which generates code as quickly as possible.
123
129
124
130
- A **second tier**, which generates optimized code for those methods that are executed frequently. The second tier of compilation is performed in parallel for enhanced performance.
125
131
126
-
You can test tiered compilation with a .NET Core 2.1 app by setting the following environment variable:
132
+
You can opt into tiered compilation in either of two ways.
127
133
128
-
```console
129
-
COMPlus_TieredCompilation="1"
130
-
```
134
+
- To use tiered compilation in all projects that use the .NET Core 2.1 SDK, set the following environment variable:
135
+
136
+
```console
137
+
COMPlus_TieredCompilation="1"
138
+
```
139
+
140
+
- To use tiered compilation on a per-project basis, add the `<TieredCompilation>` property to the `<PropertyGroup>` section of the MSBuild project file, as the following example shows:
141
+
142
+
```xml
143
+
<PropertyGroup>
144
+
<!-- other property definitions -->
145
+
146
+
<TieredCompilation>true</TieredCompilation>
147
+
</PropertyGroup>
148
+
```
131
149
132
150
## API changes
133
151
@@ -187,16 +205,20 @@ The sockets implementation introduced in .NET Core 2.1 has a number of advantage
187
205
188
206
- A significant performance improvement when compared with the previous implementation.
189
207
190
-
- Elimination on platform dependencies, which simplifies deployment and servicing.
208
+
- Elimination of platform dependencies, which simplifies deployment and servicing.
191
209
192
210
- Consistent behavior across all .NET Core platforms.
193
211
194
-
Sockets based on <xref:System.Net.Http.SocketsHttpHandler> is the default implementation in .NET Core 2.1. However, you can configure your application to use the older <xref:System.Net.Http.HttpClientHandler> class by calling the <xref:System.AppContext.SetSwitch%2A?displayProperty="nameWithType"> method:
212
+
<xref:System.Net.Http.SocketsHttpHandler> is the default implementation in .NET Core 2.1. However, you can configure your application to use the older <xref:System.Net.Http.HttpClientHandler> class by calling the <xref:System.AppContext.SetSwitch%2A?displayProperty="nameWithType"> method:
You can also use an environment variable to opt out of using sockets implementations based on <xref:System.Net.Http.SocketsHttpHandler>. To do this, set the `DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER` to either `false` or 0.
201
223
202
224
On Windows, you can also choose to use <xref:System.Net.Http.WinHttpHandler?displayProperty=nameWithType>, which relies on a native implementation, or the <xref:System.Net.Http.SocketsHttpHandler> class by passing an instance of the class to the <xref:System.Net.Http.HttpClient> constructor.
Copy file name to clipboardExpand all lines: docs/csharp/delegates-events.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,3 +41,4 @@ This topic will be covered under the following articles:
41
41
42
42
This article discusses how you should distinguish between using events and delegates in your designs.
43
43
44
+
You can download the [delegates sample](https://github.com/dotnet/samples/tree/master/csharp/delegates-and-events) and the [events sample](https://github.com/dotnet/samples/tree/master/csharp/events) from our GitHub samples repository.
0 commit comments