From e92eb293a6dd42c9170dd98dfdb01c459eba2694 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Thu, 11 Apr 2019 14:41:35 -0700 Subject: [PATCH 01/14] Added whats new for core 3 preview 3 --- docs/core/whats-new/dotnet-core-3-0.md | 84 +++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index a921edc416d36..53732d2c011a5 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -6,25 +6,34 @@ dev_langs: - "vb" author: thraka ms.author: adegeo -ms.date: 12/31/2018 +ms.date: 04/11/2018 --- -# What's new in .NET Core 3.0 (Preview 2) +# What's new in .NET Core 3.0 (Preview 3) -This article describes what is new in .NET Core 3.0 (preview 2). One of the biggest enhancements is support for Windows desktop applications (Windows only). By utilizing a .NET Core 3.0 SDK component called Windows Desktop, you can port your Windows Forms and Windows Presentation Foundation (WPF) applications. To be clear, the Windows Desktop component is only supported and included on Windows. For more information, see the section [Windows desktop](#windows-desktop) below. +This article describes what is new in .NET Core 3.0 (preview 3). One of the biggest enhancements is support for Windows desktop applications (Windows only). By utilizing a .NET Core 3.0 SDK component called Windows Desktop, you can port your Windows Forms and Windows Presentation Foundation (WPF) applications. To be clear, the Windows Desktop component is only supported and included on Windows. For more information, see the section [Windows desktop](#windows-desktop) below. .NET Core 3.0 adds support for C# 8.0. -[Download and get started with .NET Core 3.0 Preview 2](https://aka.ms/netcore3download) right now on Windows, Mac and Linux. You can see complete details of the release in the [.NET Core 3.0 Preview 2 release notes](https://aka.ms/netcore3releasenotes). +[Download and get started with .NET Core 3.0 Preview 3](https://aka.ms/netcore3download) right now on Windows, Mac and Linux. You can see complete details of the release in the [.NET Core 3.0 Preview 3 release notes](https://aka.ms/netcore3releasenotes). For more information about what was released with each version, see the following announcements: -- [.NET Core 3.0 Preview 1 announcement](https://devblogs.microsoft.com/dotnet/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks/) +- [.NET Core 3.0 Preview 3 announcement](https://devblogs.microsoft.com/dotnet/announcing-net-core-3-preview-3/) - [.NET Core 3.0 Preview 2 announcement](https://devblogs.microsoft.com/dotnet/announcing-net-core-3-preview-2/) +- [.NET Core 3.0 Preview 1 announcement](https://devblogs.microsoft.com/dotnet/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks/) + +## .NET Core SDK Windows Installer + +The MSI installer for Windows has changed with .NET Core 3.0 Preview 3. The SDK installers will now upgrade in place. + +The upgrade policy will specifically target .NET Core SDK feature bands. Feature bands are defined in hundreds groups in the patch section of the version number. For example, **3.0.101** and **3.0.201** are versions in two different feature bands while **3.0.101** and **3.0.199** are in the same feature band. + +This means when .NET Core SDK **3.0.101** becomes available and is installed, .NET Core SDK **3.0.100** will be removed from the machine if it exists. When .NET Core SDK **3.0.200** becomes available and is installed on the same machine, .NET Core SDK **3.0.101** will not be removed. In that situation, .NET Core SDK **3.0.200** will still be used by default, but .NET Core SDK **3.0.101** (or higher **.1xx** versions) will still be usable if it is configured for use via [global.json](../tools/global-json.md). ## C# 8 -.NET Core 3.0 supports C# 8, and as of .NET Core 3.0 Preview 2, supports these new features. For more information about C# 8.0 features, see the following blog posts: +.NET Core 3.0 supports C# 8. For more information about C# 8.0 features, see the following blog posts: - [Do more with patterns in C# 8.0](https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/) - [Take C# 8.0 for a spin](https://devblogs.microsoft.com/dotnet/take-c-8-0-for-a-spin/) @@ -47,6 +56,15 @@ There is also a `Range` type, which consists of two `Index` values, one for the var slice = a[i1..i2]; // { 3, 4, 5 } ``` +For example, use the range syntax with a string to create a substring. + +```csharp +string myString = "0123456789ABCDEF"; +string substring = myString[0..5]; // "01234" +``` + +The new `Range` and `Index` types support various APIs by default, such as `Span` and `Array`. + ### Async streams The `IAsyncEnumerable` type is a new asynchronous version of `IEnumerable`. The language lets you `await foreach` over `IAsyncEnumerable` to consume their elements, and use `yield return` to them to produce elements. @@ -66,7 +84,7 @@ async IAsyncEnumerable GetBigResultsAsync() In addition to being able to `await foreach`, you can also create async iterators, for example, an iterator that returns an `IAsyncEnumerable/IAsyncEnumerator` that you can both `await` and `yield` in. For objects that need to be disposed, you can use `IAsyncDisposable`, which various BCL types implement, such as `Stream` and `Timer`. > [!NOTE] -> You need .NET Core 3.0 Preview 2 to use async streams if you want to develop with either Visual Studio 2019 or the latest preview of the [C# extension for Visual Studio Code](https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.18.0-beta5). If you are using .NET Core 3.0 Preview 2 at the command line, then everything will work as expected. +> You need .NET Core 3.0 Preview 2+ to use async streams if you want to develop with either Visual Studio 2019 or the latest preview of the [C# extension for Visual Studio Code](https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.18.0-beta5). If you are using .NET Core 3.0 Preview 2+ at the command line, then everything will work as expected. ### Using Declarations @@ -104,9 +122,25 @@ There will still be cases where *switch statements* will be a better choice than For more information, see [Do more with patterns in C# 8.0](https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/). +## .NET Standard 2.1 + +Even though .NET Core 3.0 supports **.NET Standard 2.1**, the default `dotnet new classlib` template will generate a project that targets **.NET Standard 2.0**. In order to target **.NET Standard 2.1**, you’ll have to edit your project file and change the `TargetFramework` property to `netstandard2.1`: + +```xml + + + + netstandard2.1 + + + +``` + +If you are using Visual Studio, you will need Visual Studio 2019 as Visual Studio 2017 will not support **.NET Standard 2.1**. + ## IEEE Floating-point improvements -Floating point APIs are in the process of being updated to comply with [IEEE 754-2008 revision](https://en.wikipedia.org/wiki/IEEE_754-2008_revision). The goal of these changes is to expose all "required" operations and ensure that they are behaviorally compliant with the IEEE spec. +Floating point APIs are in the process of being updated to comply with [IEEE 754-2008 revision](https://en.wikipedia.org/wiki/IEEE_754-2008_revision). The goal of these changes is to expose all "required" operations and ensure that they are behaviorally compliant with the IEEE spec. For more information about floating-point improvements, see the [blog post](https://devblogs.microsoft.com/dotnet/floating-point-parsing-and-formatting-improvements-in-net-core-3-0/). Parsing and formatting fixes: @@ -309,6 +343,20 @@ The [Windows Application Packaging Project](https://docs.microsoft.com/windows/u win-x86;win-x64 ``` +## WinForms HighDPI + +.NET Core Windows Forms applications can set High DPI mode with . The `SetHighDpiMode` method will set the corresponding High DPI mode unless the setting has been set by other means like `App.Manifest` or P/Invoke before `Application.Run`. + +The possible `HighDPIMode` values, as expressed by the `HighDpiMode` enum are: + +* `DpiUnaware` +* `SystemAware` +* `PerMonitor` +* `PerMonitorV2` +* `DpiUnawareGdiScaled` + +For more information about High DPI modes, see [High DPI Desktop Application Development on Windows](/windows/desktop/hidpi/high-dpi-desktop-application-development-on-windows). + ## Fast built-in JSON support The .NET ecosystem has relied on [**Json.NET**](https://www.newtonsoft.com/json) and other popular JSON libraries, which continue to be good choices. **Json.NET** uses .NET strings as its base datatype, which are UTF-16 under the hood. @@ -541,6 +589,16 @@ The `MetadataLoadContext` has a resolver class passed to its constructor. The re The [MetadataLoadContext tests](https://github.com/dotnet/corefx/tree/master/src/System.Reflection.MetadataLoadContext/tests/src/Tests) demonstrate many use cases. The [Assembly tests](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.MetadataLoadContext/tests/src/Tests/Assembly/AssemblyTests.cs) are a good place to start. + +## Type: AssemblyDependencyResolver + +Loading dependent assemblies from a given path was not supported in .NET Core. Now with the type, you can help `AssemblyLoadContext` resolve paths to dependent assemblies. For code examples, see the [AppWithPlugin Demo](https://github.com/dotnet/samples/tree/master/core/extensions/AppWithPlugin). + +## Type: NativeLibrary + + provides an encapsulation for loading a native library (using the same load logic as .NET Core P/Invoke) and providing the relevant helper functions such as `getSymbol`. For a code example, see the [DLLMap Demo](https://github.com/dotnet/samples/tree/master/core/extensions/AppWithPlugin). +https://github.com/dotnet/samples/tree/master/core/extensions/DllMapDemo + ## TLS 1.3 & OpenSSL 1.1.1 on Linux .NET Core will now take advantage of [TLS 1.3 support in OpenSSL 1.1.1](https://www.openssl.org/blog/blog/2018/09/11/release111/), when it is available in a given environment. There are multiple benefits of TLS 1.3, per the [OpenSSL team](https://www.openssl.org/blog/blog/2018/09/11/release111/): @@ -755,6 +813,16 @@ sudo snap alias dotnet-sdk.dotnet dotnet Some distros require an additional step to enable access to the SSL certificate. See our [Linux Setup](https://github.com/dotnet/core/blob/master/Documentation/linux-setup.md) for details. +## Docker and cgroup memory Limits + +As of Preview 3, Running .NET Core 3.0 on Linux with Docker works better with cgroup memory limits. Running a Docker container with memory limits, such as with `docker run -m`, will change how .NET Core behaves. + +* Default GC heap size: maximum of 20mb or 75% of the memory limit on the container. +* Explicit size can be set as an absolute number or percentage of cgroup limit. +* Minimum reserved segment size per GC heap is 16mb, which will reduce the number of heaps created on machines with a large number of cores and small memory limits. + +The GC change is the most critical part of our memory limits solution. It is also important to [update BCL APIs to honor cgroup settings](https://github.com/dotnet/corefx/issues/35638). Those changes are not included in Preview 3 but will come later. We’d appreciate feedback on which BCL APIs are most important to update first ([another example](https://github.com/dotnet/corefx/issues/32748)). + ## GPIO Support for Raspberry Pi Two new packages have been released to NuGet that you can use for GPIO programming. From 1510c9410b9a5dc5f2c1b8153e72b237bcb59521 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:30:35 -0700 Subject: [PATCH 02/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 53732d2c011a5..c63c695b81b28 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -11,7 +11,7 @@ ms.date: 04/11/2018 # What's new in .NET Core 3.0 (Preview 3) -This article describes what is new in .NET Core 3.0 (preview 3). One of the biggest enhancements is support for Windows desktop applications (Windows only). By utilizing a .NET Core 3.0 SDK component called Windows Desktop, you can port your Windows Forms and Windows Presentation Foundation (WPF) applications. To be clear, the Windows Desktop component is only supported and included on Windows. For more information, see the section [Windows desktop](#windows-desktop) below. +This article describes what is new in .NET Core 3.0 (preview 3). One of the biggest enhancements is support for Windows desktop applications (Windows only). By utilizing a .NET Core 3.0 SDK component called Windows Desktop, you can port your Windows Forms and Windows Presentation Foundation (WPF) applications. To be clear, the Windows Desktop component is only supported and included on Windows. For more information, see the [Windows desktop](#windows-desktop) section later in this article. .NET Core 3.0 adds support for C# 8.0. From fc91195a7ce198d341f986b8847e4ca45ec55698 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:52:34 -0700 Subject: [PATCH 03/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index c63c695b81b28..dee34aabecf07 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -27,7 +27,7 @@ For more information about what was released with each version, see the followin The MSI installer for Windows has changed with .NET Core 3.0 Preview 3. The SDK installers will now upgrade in place. -The upgrade policy will specifically target .NET Core SDK feature bands. Feature bands are defined in hundreds groups in the patch section of the version number. For example, **3.0.101** and **3.0.201** are versions in two different feature bands while **3.0.101** and **3.0.199** are in the same feature band. +The upgrade policy specifically targets .NET Core SDK feature bands. Feature bands are defined in the hundreds groups in the patch section of the version number. For example, **3.0.101** and **3.0.201** are versions in two different feature bands while **3.0.101** and **3.0.199** are in the same feature band. This means when .NET Core SDK **3.0.101** becomes available and is installed, .NET Core SDK **3.0.100** will be removed from the machine if it exists. When .NET Core SDK **3.0.200** becomes available and is installed on the same machine, .NET Core SDK **3.0.101** will not be removed. In that situation, .NET Core SDK **3.0.200** will still be used by default, but .NET Core SDK **3.0.101** (or higher **.1xx** versions) will still be usable if it is configured for use via [global.json](../tools/global-json.md). From 88da1763919e1ca2ea181a70da3f546760e6c246 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:57:35 -0700 Subject: [PATCH 04/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index dee34aabecf07..5748bdd032435 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -124,7 +124,7 @@ For more information, see [Do more with patterns in C# 8.0](https://devblogs.mic ## .NET Standard 2.1 -Even though .NET Core 3.0 supports **.NET Standard 2.1**, the default `dotnet new classlib` template will generate a project that targets **.NET Standard 2.0**. In order to target **.NET Standard 2.1**, you’ll have to edit your project file and change the `TargetFramework` property to `netstandard2.1`: +Even though .NET Core 3.0 supports **.NET Standard 2.1**, the default `dotnet new classlib` template generates a project that targets **.NET Standard 2.0**. In order to target **.NET Standard 2.1**, edit your project file and change the `TargetFramework` property to `netstandard2.1`: ```xml From 0bfca703fc1344cda0745c90caa4a8ea3e769f2e Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:57:54 -0700 Subject: [PATCH 05/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 5748bdd032435..7fe3130607137 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -84,7 +84,7 @@ async IAsyncEnumerable GetBigResultsAsync() In addition to being able to `await foreach`, you can also create async iterators, for example, an iterator that returns an `IAsyncEnumerable/IAsyncEnumerator` that you can both `await` and `yield` in. For objects that need to be disposed, you can use `IAsyncDisposable`, which various BCL types implement, such as `Stream` and `Timer`. > [!NOTE] -> You need .NET Core 3.0 Preview 2+ to use async streams if you want to develop with either Visual Studio 2019 or the latest preview of the [C# extension for Visual Studio Code](https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.18.0-beta5). If you are using .NET Core 3.0 Preview 2+ at the command line, then everything will work as expected. +> You need .NET Core 3.0 Preview 2 or later versions to use async streams if you want to develop with either Visual Studio 2019 or the latest preview of the [C# extension for Visual Studio Code](https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.18.0-beta5). If you're using .NET Core 3.0 Preview 2 and later versions at the command line, then everything works as expected. ### Using Declarations From 4e9a709954167b46b08ce10fabb9099073931d6f Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:58:15 -0700 Subject: [PATCH 06/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 7fe3130607137..3198fda2ebac8 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -601,7 +601,7 @@ https://github.com/dotnet/samples/tree/master/core/extensions/DllMapDemo ## TLS 1.3 & OpenSSL 1.1.1 on Linux -.NET Core will now take advantage of [TLS 1.3 support in OpenSSL 1.1.1](https://www.openssl.org/blog/blog/2018/09/11/release111/), when it is available in a given environment. There are multiple benefits of TLS 1.3, per the [OpenSSL team](https://www.openssl.org/blog/blog/2018/09/11/release111/): +.NET Core now takes advantage of [TLS 1.3 support in OpenSSL 1.1.1](https://www.openssl.org/blog/blog/2018/09/11/release111/), when it's available in a given environment. There are multiple benefits of TLS 1.3, per the [OpenSSL team](https://www.openssl.org/blog/blog/2018/09/11/release111/): * Improved connection times due to a reduction in the number of round trips required between the client and server. From 838185a87c8c75faab3889c25f136483567c014d Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:58:26 -0700 Subject: [PATCH 07/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 3198fda2ebac8..6c7806588a049 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -815,7 +815,7 @@ Some distros require an additional step to enable access to the SSL certificate. ## Docker and cgroup memory Limits -As of Preview 3, Running .NET Core 3.0 on Linux with Docker works better with cgroup memory limits. Running a Docker container with memory limits, such as with `docker run -m`, will change how .NET Core behaves. +As of Preview 3, running .NET Core 3.0 on Linux with Docker works better with cgroup memory limits. Running a Docker container with memory limits, such as with `docker run -m`, changes how .NET Core behaves. * Default GC heap size: maximum of 20mb or 75% of the memory limit on the container. * Explicit size can be set as an absolute number or percentage of cgroup limit. From 12139c1365762f4fc51d558a8b7484a52811a07e Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:58:45 -0700 Subject: [PATCH 08/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 6c7806588a049..53bae0cf52fec 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -819,7 +819,7 @@ As of Preview 3, running .NET Core 3.0 on Linux with Docker works better with cg * Default GC heap size: maximum of 20mb or 75% of the memory limit on the container. * Explicit size can be set as an absolute number or percentage of cgroup limit. -* Minimum reserved segment size per GC heap is 16mb, which will reduce the number of heaps created on machines with a large number of cores and small memory limits. +* Minimum reserved segment size per GC heap is 16mb, which reduces the number of heaps created on machines with a large number of cores and small memory limits. The GC change is the most critical part of our memory limits solution. It is also important to [update BCL APIs to honor cgroup settings](https://github.com/dotnet/corefx/issues/35638). Those changes are not included in Preview 3 but will come later. We’d appreciate feedback on which BCL APIs are most important to update first ([another example](https://github.com/dotnet/corefx/issues/32748)). From 65d6ad4e3a7af134f5fd48ed0a12f69fa6fa4507 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 08:59:00 -0700 Subject: [PATCH 09/14] Update docs/core/whats-new/dotnet-core-3-0.md Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 53bae0cf52fec..52dff6c514b1a 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -821,7 +821,7 @@ As of Preview 3, running .NET Core 3.0 on Linux with Docker works better with cg * Explicit size can be set as an absolute number or percentage of cgroup limit. * Minimum reserved segment size per GC heap is 16mb, which reduces the number of heaps created on machines with a large number of cores and small memory limits. -The GC change is the most critical part of our memory limits solution. It is also important to [update BCL APIs to honor cgroup settings](https://github.com/dotnet/corefx/issues/35638). Those changes are not included in Preview 3 but will come later. We’d appreciate feedback on which BCL APIs are most important to update first ([another example](https://github.com/dotnet/corefx/issues/32748)). +The GC change is the most critical part of our memory limits solution. It's also important to [update BCL APIs to honor cgroup settings](https://github.com/dotnet/corefx/issues/35638). Those changes are not included in Preview 3 but will come later. We’d appreciate feedback on which BCL APIs are most important to update first ([another example](https://github.com/dotnet/corefx/issues/32748)). ## GPIO Support for Raspberry Pi From 56c02b40b942eab494c818b47df1f4b8cb82f5e6 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Mon, 15 Apr 2019 09:10:47 -0700 Subject: [PATCH 10/14] feedback fixes --- docs/core/whats-new/dotnet-core-3-0.md | 93 ++------------------------ 1 file changed, 4 insertions(+), 89 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 52dff6c514b1a..edb3897e6460b 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -31,96 +31,11 @@ The upgrade policy specifically targets .NET Core SDK feature bands. Feature ban This means when .NET Core SDK **3.0.101** becomes available and is installed, .NET Core SDK **3.0.100** will be removed from the machine if it exists. When .NET Core SDK **3.0.200** becomes available and is installed on the same machine, .NET Core SDK **3.0.101** will not be removed. In that situation, .NET Core SDK **3.0.200** will still be used by default, but .NET Core SDK **3.0.101** (or higher **.1xx** versions) will still be usable if it is configured for use via [global.json](../tools/global-json.md). -## C# 8 - -.NET Core 3.0 supports C# 8. For more information about C# 8.0 features, see the following blog posts: - -- [Do more with patterns in C# 8.0](https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/) -- [Take C# 8.0 for a spin](https://devblogs.microsoft.com/dotnet/take-c-8-0-for-a-spin/) -- [Building C# 8.0](https://devblogs.microsoft.com/dotnet/building-c-8-0/) - -### Ranges and indices - -The new `Index` type can be used for indexing. You can create one from an `int` that counts from the beginning, or with a prefix `^` operator (C#) that counts from the end: - -```csharp -Index i1 = 3; // number 3 from beginning -Index i2 = ^4; // number 4 from end -int[] a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; -Console.WriteLine($"{a[i1]}, {a[i2]}"); // "3, 6" -``` - -There is also a `Range` type, which consists of two `Index` values, one for the start and one for the end, and can be written with a `x..y` range expression (C#). You can then index with a `Range` in order to produce a slice: - -```csharp -var slice = a[i1..i2]; // { 3, 4, 5 } -``` - -For example, use the range syntax with a string to create a substring. - -```csharp -string myString = "0123456789ABCDEF"; -string substring = myString[0..5]; // "01234" -``` - -The new `Range` and `Index` types support various APIs by default, such as `Span` and `Array`. - -### Async streams - -The `IAsyncEnumerable` type is a new asynchronous version of `IEnumerable`. The language lets you `await foreach` over `IAsyncEnumerable` to consume their elements, and use `yield return` to them to produce elements. - -The following example demonstrates both production and consumption of async streams. The `foreach` statement is async and itself uses `yield return` to produce an async stream for callers. This pattern (using `yield return`) is the recommended model for producing async streams. - -```csharp -async IAsyncEnumerable GetBigResultsAsync() -{ - await foreach (var result in GetResultsAsync()) - { - if (result > 20) yield return result; - } -} -``` - -In addition to being able to `await foreach`, you can also create async iterators, for example, an iterator that returns an `IAsyncEnumerable/IAsyncEnumerator` that you can both `await` and `yield` in. For objects that need to be disposed, you can use `IAsyncDisposable`, which various BCL types implement, such as `Stream` and `Timer`. - -> [!NOTE] -> You need .NET Core 3.0 Preview 2 or later versions to use async streams if you want to develop with either Visual Studio 2019 or the latest preview of the [C# extension for Visual Studio Code](https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.18.0-beta5). If you're using .NET Core 3.0 Preview 2 and later versions at the command line, then everything works as expected. +For more information about versioning, see [Overview of how .NET Core is versioned](../versions/index.md). -### Using Declarations - -*Using declarations* are a new way to ensure your object is properly disposed. A *using declaration* keeps the object alive while it is still in scope. Once the object becomes out of scope, it is automatically disposed. This will reduce nested *using statements* and make your code cleaner. - -```csharp -static void Main(string[] args) -{ - using var options = Parse(args); - if (options["verbose"]) { WriteLine("Logging..."); } - -} // options disposed here -``` - -### Switch Expressions - -*Switch expressions* are a cleaner way of doing a *switch statement* but, since it's an expression, returns a value. *Switch expressions* are also fully integrated with pattern matching, and use the discard pattern, `_`, to represent the `default` value. - -You can see the syntax for *switch expressions* in the following example: - -```csharp -static string Display(object o) => o switch -{ - Point { X: 0, Y: 0 } => "origin", - Point { X: var x, Y: var y } => $"({x}, {y})", - _ => "unknown" -}; -``` - -There are two patterns at play in this example. `o` first matches with the `Point` *type pattern* and then with the *property pattern* inside the *{curly braces}*. The `_` describes the `discard pattern`, which is the same as `default` for *switch statements*. - -Patterns enable you to write declarative code that captures your intent instead of procedural code that implements tests for it. The compiler becomes responsible for implementing that boring procedural code and is guaranteed to always do it correctly. - -There will still be cases where *switch statements* will be a better choice than *switch expressions* and patterns can be used with both syntax styles. +## C# 8 -For more information, see [Do more with patterns in C# 8.0](https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/). +.NET Core 3.0 supports C# 8. For more information about C# 8.0 features, see [What's new in C# 8.0](../../csharp/whats-new/csharp-8.md). ## .NET Standard 2.1 @@ -136,7 +51,7 @@ Even though .NET Core 3.0 supports **.NET Standard 2.1**, the default `dotnet ne ``` -If you are using Visual Studio, you will need Visual Studio 2019 as Visual Studio 2017 will not support **.NET Standard 2.1**. +If you're using Visual Studio, you need Visual Studio 2019 as Visual Studio 2017 doesn't support **.NET Standard 2.1** or **.NET Core 3.0**. ## IEEE Floating-point improvements From 7601c4d3ddf2bd809c7bc2da2a2d8e913128be74 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Mon, 15 Apr 2019 09:16:55 -0700 Subject: [PATCH 11/14] Apply suggestions from code review Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 52dff6c514b1a..0e2675e5eb229 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -15,7 +15,7 @@ This article describes what is new in .NET Core 3.0 (preview 3). One of the bigg .NET Core 3.0 adds support for C# 8.0. -[Download and get started with .NET Core 3.0 Preview 3](https://aka.ms/netcore3download) right now on Windows, Mac and Linux. You can see complete details of the release in the [.NET Core 3.0 Preview 3 release notes](https://aka.ms/netcore3releasenotes). +[Download and get started with .NET Core 3.0 Preview 3](https://aka.ms/netcore3download) right now on Windows, Mac, and Linux. You can see complete details of the release in the [.NET Core 3.0 Preview 3 release notes](https://aka.ms/netcore3releasenotes). For more information about what was released with each version, see the following announcements: @@ -140,7 +140,7 @@ If you are using Visual Studio, you will need Visual Studio 2019 as Visual Studi ## IEEE Floating-point improvements -Floating point APIs are in the process of being updated to comply with [IEEE 754-2008 revision](https://en.wikipedia.org/wiki/IEEE_754-2008_revision). The goal of these changes is to expose all "required" operations and ensure that they are behaviorally compliant with the IEEE spec. For more information about floating-point improvements, see the [blog post](https://devblogs.microsoft.com/dotnet/floating-point-parsing-and-formatting-improvements-in-net-core-3-0/). +Floating point APIs are in the process of being updated to comply with [IEEE 754-2008 revision](https://en.wikipedia.org/wiki/IEEE_754-2008_revision). The goal of these changes is to expose all "required" operations and ensure that they are behaviorally compliant with the IEEE spec. For more information about floating-point improvements, see the [Floating-Point Parsing and Formatting improvements in .NET Core 3.0](https://devblogs.microsoft.com/dotnet/floating-point-parsing-and-formatting-improvements-in-net-core-3-0/) blog post. Parsing and formatting fixes: @@ -345,7 +345,7 @@ The [Windows Application Packaging Project](https://docs.microsoft.com/windows/u ## WinForms HighDPI -.NET Core Windows Forms applications can set High DPI mode with . The `SetHighDpiMode` method will set the corresponding High DPI mode unless the setting has been set by other means like `App.Manifest` or P/Invoke before `Application.Run`. +.NET Core Windows Forms applications can set High DPI mode with . The `SetHighDpiMode` method sets the corresponding High DPI mode unless the setting has been set by other means like `App.Manifest` or P/Invoke before `Application.Run`. The possible `HighDPIMode` values, as expressed by the `HighDpiMode` enum are: From 086b8f421c7379e4f0ce78e89098e87829de0e93 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Mon, 15 Apr 2019 09:28:47 -0700 Subject: [PATCH 12/14] acro fixes --- docs/core/whats-new/dotnet-core-3-0.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 01d15c309666d..bacddc17b1122 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -72,10 +72,10 @@ Corresponds to the `nextUp` and `nextDown` IEEE operations. They return the smal Corresponds to the `maxNumMag` and `minNumMag` IEEE operations, they return the value that is greater or lesser in magnitude of the two inputs (respectively). For example, `Math.MaxMagnitude(2.0, -3.0)` would return `-3.0`. * `ILogB`\ -Corresponds to the `logB` IEEE operation which returns an integral value, it returns the integral base-2 log of the input parameter. This is effectively the same as `floor(log2(x))`, but done with minimal rounding error. +Corresponds to the `logB` IEEE operation that returns an integral value, it returns the integral base-2 log of the input parameter. This is effectively the same as `floor(log2(x))`, but done with minimal rounding error. * `ScaleB`\ -Corresponds to the `scaleB` IEEE operation which takes an integral value, it returns effectively `x * pow(2, n)`, but is done with minimal rounding error. +Corresponds to the `scaleB` IEEE operation that takes an integral value, it returns effectively `x * pow(2, n)`, but is done with minimal rounding error. * `Log2`\ Corresponds to the `log2` IEEE operation, it returns the base-2 logarithm. It minimizes rounding error. @@ -86,9 +86,9 @@ Corresponds to the `fma` IEEE operation, it performs a fused multiply add. That * `CopySign`\ Corresponds to the `copySign` IEEE operation, it returns the value of `x`, but with the sign of `y`. -## .NET Platform Dependent Intrinsics +## .NET Platform-Dependent Intrinsics -APIs have been added that allow access to certain perf-oriented CPU instructions, such as the **SIMD** or **Bit Manipulation instruction** sets. These instructions can help achieve big performance improvements in certain scenarios, such as processing data efficiently in parallel. In addition to exposing the APIs for your programs to use, the .NET libraries have begun using these instructions to improve performance. +APIs have been added that allow access to certain perf-oriented CPU instructions, such as the **SIMD** or **Bit Manipulation instruction** sets. These instructions can help achieve significant performance improvements in certain scenarios, such as processing data efficiently in parallel. In addition to exposing the APIs for your programs to use, the .NET libraries have begun using these instructions to improve performance. The following CoreCLR PRs demonstrate a few of the intrinsics, either via implementation or use: @@ -213,8 +213,6 @@ dotnet new winforms Visual Studio 2019 adds **New Project** templates for .NET Core 3.0 Windows Forms and WPF. Designers are still not yet supported. And you can open, launch, and debug these projects in Visual Studio 2019. -Visual Studio 2017 15.9 adds the ability to [enable .NET Core previews](https://devblogs.microsoft.com/dotnet/net-core-tooling-update-for-visual-studio-2017-version-15-9/), but you need to turn that feature on, and it's not a supported scenario. - The new projects are the same as existing .NET Core projects, with a couple additions. Here is the comparison of the basic .NET Core console project and a basic Windows Forms and WPF project. In a .NET Core console project, the project uses the `Microsoft.NET.Sdk` SDK and declares a dependency on .NET Core 3.0 via the `netcoreapp3.0` target framework. To create a Windows Desktop app, use the `Microsoft.NET.Sdk.WindowsDesktop` SDK and choose which UI framework to use: @@ -245,7 +243,7 @@ To choose Windows Forms over WPF, set `UseWindowsForms` instead of `UseWPF`: Both `UseWPF` and `UseWindowsForms` can be set to `true` if the app uses both frameworks, for example when a Windows Forms dialog is hosting a WPF control. -Please share your feedback on the [dotnet/winforms](https://github.com/dotnet/winforms/issues), [dotnet/wpf](https://github.com/dotnet/wpf/issues) and [dotnet/core](https://github.com/dotnet/core/issues) repos. +Share your feedback on the [dotnet/winforms](https://github.com/dotnet/winforms/issues), [dotnet/wpf](https://github.com/dotnet/wpf/issues) and [dotnet/core](https://github.com/dotnet/core/issues) repos. ## MSIX Deployment for Windows Desktop @@ -262,7 +260,7 @@ The [Windows Application Packaging Project](https://docs.microsoft.com/windows/u .NET Core Windows Forms applications can set High DPI mode with . The `SetHighDpiMode` method sets the corresponding High DPI mode unless the setting has been set by other means like `App.Manifest` or P/Invoke before `Application.Run`. -The possible `HighDPIMode` values, as expressed by the `HighDpiMode` enum are: +The possible `highDpiMode` values, as expressed by the enum are: * `DpiUnaware` * `SystemAware` @@ -274,7 +272,7 @@ For more information about High DPI modes, see [High DPI Desktop Application Dev ## Fast built-in JSON support -The .NET ecosystem has relied on [**Json.NET**](https://www.newtonsoft.com/json) and other popular JSON libraries, which continue to be good choices. **Json.NET** uses .NET strings as its base datatype, which are UTF-16 under the hood. +The .NET ecosystem has relied on [**Json.NET**](https://www.newtonsoft.com/json) and other popular JSON libraries, which continue to be good choices. **Json.NET** uses .NET strings as its base datatype, which is UTF-16 under the hood. The new built-in JSON support is high-performance, low allocation, and based on `Span`. Three new main JSON-related types have been added to .NET Core 3.0 the `System.Text.Json` namespace. @@ -383,7 +381,7 @@ The `Utf8JsonWriter` accepts `IBufferWriter` as the output location to syn ### JsonDocument -`System.Text.Json.JsonDocument` is built on top of the `Utf8JsonReader`. The `JsonDocument` provides the ability to parse JSON data and build a read-only Document Object Model (DOM) that can be queried to support random access and enumeration. The JSON elements that compose the data can be accessed via the `JsonElement` type which is exposed by the `JsonDocument` as a property called `RootElement`. The `JsonElement` contains the JSON array and object enumerators along with APIs to convert JSON text to common .NET types. Parsing a typical JSON payload and accessing all its members using the `JsonDocument` is 2-3x faster than **Json.NET** with very little allocations for data that is reasonably sized (i.e. < 1 MB). +`System.Text.Json.JsonDocument` is built on top of the `Utf8JsonReader`. The `JsonDocument` provides the ability to parse JSON data and build a read-only Document Object Model (DOM) that can be queried to support random access and enumeration. The JSON elements that compose the data can be accessed via the `JsonElement` type that is exposed by the `JsonDocument` as a property called `RootElement`. The `JsonElement` contains the JSON array and object enumerators along with APIs to convert JSON text to common .NET types. Parsing a typical JSON payload and accessing all its members using the `JsonDocument` is 2-3x faster than **Json.NET** with little allocations for data that is reasonably sized (that is, < 1 MB). Here is a sample usage of the `JsonDocument` and `JsonElement` that can be used as a starting point: @@ -745,7 +743,7 @@ Two new packages have been released to NuGet that you can use for GPIO programmi * [System.Device.Gpio](https://www.nuget.org/packages/System.Device.Gpio/0.1.0-prerelease.19078.2) * [Iot.Device.Bindings](https://www.nuget.org/packages/Iot.Device.Bindings/0.1.0-prerelease.19078.2) -The GPIO Packages includes APIs for GPIO, SPI, I2C and PWM devices. The IoT bindings package includes [device bindings](https://github.com/dotnet/iot/blob/master/src/devices/README.md) for various chips and sensors, the same ones available at [dotnet/iot - src/devices](https://github.com/dotnet/iot/tree/master/src/devices). +The GPIO packages include APIs for GPIO, SPI, I2C, and PWM devices. The IoT bindings package includes [device bindings](https://github.com/dotnet/iot/blob/master/src/devices/README.md) for various chips and sensors, the same ones available at [dotnet/iot - src/devices](https://github.com/dotnet/iot/tree/master/src/devices). The updated serial port APIs that were announced as part of .NET Core 3.0 Preview 1 are not part of these packages but are available as part of the .NET Core platform. From 7d0264b05477163148c6d778585d88bcb909586d Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Wed, 17 Apr 2019 08:51:26 -0700 Subject: [PATCH 13/14] Apply suggestions from code review Co-Authored-By: Thraka <2672110+Thraka@users.noreply.github.com> --- docs/core/whats-new/dotnet-core-3-0.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 76130a33c30b9..1a79289c39ea4 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -6,7 +6,7 @@ dev_langs: - "vb" author: thraka ms.author: adegeo -ms.date: 04/11/2018 +ms.date: 04/11/2019 --- # What's new in .NET Core 3.0 (Preview 3) @@ -90,7 +90,7 @@ Corresponds to the `copySign` IEEE operation, it returns the value of `x`, but w APIs have been added that allow access to certain perf-oriented CPU instructions, such as the **SIMD** or **Bit Manipulation instruction** sets. These instructions can help achieve significant performance improvements in certain scenarios, such as processing data efficiently in parallel. In addition to exposing the APIs for your programs to use, the .NET libraries have begun using these instructions to improve performance. -The following CoreCLR PRs demonstrate a few of the intrinsics, either via implementation or use: +The following CoreCLR pull requests demonstrate a few of the intrinsics, either via implementation or use: * [Implement simple SSE2 hardware intrinsics](https://github.com/dotnet/coreclr/pull/15585) * [Implement the SSE hardware intrinsics](https://github.com/dotnet/coreclr/pull/15538) @@ -276,7 +276,7 @@ For more information about High DPI modes, see [High DPI Desktop Application Dev The .NET ecosystem has relied on [**Json.NET**](https://www.newtonsoft.com/json) and other popular JSON libraries, which continue to be good choices. **Json.NET** uses .NET strings as its base datatype, which is UTF-16 under the hood. -The new built-in JSON support is high-performance, low allocation, and based on `Span`. Three new main JSON-related types have been added to .NET Core 3.0 the `System.Text.Json` namespace. +The new built-in JSON support is high-performance, low allocation, and based on `Span`. Three new main JSON-related types have been added to .NET Core 3.0 the namespace. ### Utf8JsonReader @@ -512,7 +512,6 @@ Loading dependent assemblies from a given path was not supported in .NET Core. N ## Type: NativeLibrary provides an encapsulation for loading a native library (using the same load logic as .NET Core P/Invoke) and providing the relevant helper functions such as `getSymbol`. For a code example, see the [DLLMap Demo](https://github.com/dotnet/samples/tree/master/core/extensions/AppWithPlugin). -https://github.com/dotnet/samples/tree/master/core/extensions/DllMapDemo ## TLS 1.3 & OpenSSL 1.1.1 on Linux @@ -726,11 +725,11 @@ When .NET Core in installed using the Snap package, the default .NET Core comman sudo snap alias dotnet-sdk.dotnet dotnet ``` -Some distros require an additional step to enable access to the SSL certificate. See our [Linux Setup](https://github.com/dotnet/core/blob/master/Documentation/linux-setup.md) for details. +Some distributions require an additional step to enable access to the SSL certificate. For more information, see [Linux Setup](https://github.com/dotnet/core/blob/master/Documentation/linux-setup.md). ## Docker and cgroup memory Limits -As of Preview 3, running .NET Core 3.0 on Linux with Docker works better with cgroup memory limits. Running a Docker container with memory limits, such as with `docker run -m`, changes how .NET Core behaves. +Starting with Preview 3, running .NET Core 3.0 on Linux with Docker works better with cgroup memory limits. Running a Docker container with memory limits, such as with `docker run -m`, changes how .NET Core behaves. * Default GC heap size: maximum of 20mb or 75% of the memory limit on the container. * Explicit size can be set as an absolute number or percentage of cgroup limit. @@ -747,7 +746,7 @@ Two new packages have been released to NuGet that you can use for GPIO programmi The GPIO packages include APIs for GPIO, SPI, I2C, and PWM devices. The IoT bindings package includes [device bindings](https://github.com/dotnet/iot/blob/master/src/devices/README.md) for various chips and sensors, the same ones available at [dotnet/iot - src/devices](https://github.com/dotnet/iot/tree/master/src/devices). -The updated serial port APIs that were announced as part of .NET Core 3.0 Preview 1 are not part of these packages but are available as part of the .NET Core platform. +The updated serial port APIs are not part of these packages but are available as part of the .NET Core platform. ## Platform Support From fb0c2b1832c4f98901443c6a34ee6db019b8e0b6 Mon Sep 17 00:00:00 2001 From: Andy De George Date: Wed, 17 Apr 2019 09:35:44 -0700 Subject: [PATCH 14/14] Clean up preview mentions; fix JSON notes --- docs/core/whats-new/dotnet-core-3-0.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index 1a79289c39ea4..0c6deb8fb46ba 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -117,7 +117,7 @@ There are some operations, like linking and razor page publishing that will stil ## Local dotnet tools > [!WARNING] -> There was a change in .NET Core Local Tools between .NET Core 3.0 Preview 1 and .NET Core 3.0 Preview 2. If you tried out local tools in Preview 1 by running a command like `dotnet tool restore` or `dotnet tool install`, you need to delete your local tools cache folder before local tools will work correctly in Preview 2. This folder is located at: +> There was a change in .NET Core Local Tools between .NET Core 3.0 Preview 1 and .NET Core 3.0 Preview 2. If you tried out local tools in Preview 1 by running a command like `dotnet tool restore` or `dotnet tool install`, you need to delete your local tools cache folder before local tools will work correctly in Preview 2. This folder is located at: > > On mac, Linux: `rm -r $HOME/.dotnet/toolResolverCache` > @@ -200,7 +200,7 @@ For both global and local tools, a compatible version of the runtime is required ## Windows desktop -Starting with .NET Core 3.0 Preview 1, you can build Windows desktop applications using WPF and Windows Forms. These frameworks also support using modern controls and Fluent styling from the Windows UI XAML Library (WinUI) via [XAML islands](/windows/uwp/xaml-platform/xaml-host-controls). +Starting with .NET Core 3.0 you can build Windows desktop applications using WPF and Windows Forms. These frameworks also support using modern controls and Fluent styling from the Windows UI XAML Library (WinUI) via [XAML islands](/windows/uwp/xaml-platform/xaml-host-controls). The Windows Desktop component is part of the Windows .NET Core 3.0 SDK. @@ -276,17 +276,12 @@ For more information about High DPI modes, see [High DPI Desktop Application Dev The .NET ecosystem has relied on [**Json.NET**](https://www.newtonsoft.com/json) and other popular JSON libraries, which continue to be good choices. **Json.NET** uses .NET strings as its base datatype, which is UTF-16 under the hood. -The new built-in JSON support is high-performance, low allocation, and based on `Span`. Three new main JSON-related types have been added to .NET Core 3.0 the namespace. +The new built-in JSON support is high-performance, low allocation, and based on `Span`. Three new main JSON-related types have been added to .NET Core 3.0 the namespace. These types do not *yet* support plain old CLR object (POCO) serialization and deserialization. ### Utf8JsonReader `System.Text.Json.Utf8JsonReader` is a high-performance, low allocation, forward-only reader for UTF-8 encoded JSON text, read from a `ReadOnlySpan`. The `Utf8JsonReader` is a foundational, low-level type, that can be leveraged to build custom parsers and deserializers. Reading through a JSON payload using the new `Utf8JsonReader` is 2x faster than using the reader from **Json.NET**. It does not allocate until you need to actualize JSON tokens as (UTF-16) strings. -This new API will include the following components: - -* In Preview 1: JSON reader (sequential access) -* Coming next: JSON writer, DOM (random access), poco serializer, poco deserializer - Here is the basic reader loop for the `Utf8JsonReader` that can be used as a starting point: ```csharp @@ -379,7 +374,7 @@ static int WriteJson(IBufferWriter output, long[] extraData) } ``` -The `Utf8JsonWriter` accepts `IBufferWriter` as the output location to synchronously write the json data into, and you as the caller need to provide a concrete implementation. The platform does not currently include an implementation of this interface. For an example of `IBufferWriter`, see [https://gist.github.com/ahsonkhan/c76a1cc4dc7107537c3fdc0079a68b35](https://gist.github.com/ahsonkhan/c76a1cc4dc7107537c3fdc0079a68b35) +The `Utf8JsonWriter` accepts `IBufferWriter` as the output location to synchronously write the json data into, and you as the caller need to provide a concrete implementation. The platform does not currently include an implementation of this interface. For an example of `IBufferWriter`, see [https://gist.github.com/ahsonkhan/c76a1cc4dc7107537c3fdc0079a68b35](https://gist.github.com/ahsonkhan/c76a1cc4dc7107537c3fdc0079a68b35). ### JsonDocument @@ -426,7 +421,7 @@ This new capability can be used for scenarios similar to: * Plugin scenarios where dynamic plugin loading and unloading is required. * Dynamically compiling, running and then flushing code. Useful for web sites, scripting engines, etc. -* Loading assemblies for introspection (like ReflectionOnlyLoad), although [MetadataLoadContext](#type-metadataloadcontext) (released in Preview 1) will be a better choice in many cases. +* Loading assemblies for introspection (like ReflectionOnlyLoad), although [MetadataLoadContext](#type-metadataloadcontext) will be a better choice in many cases. For more information, see the [Using Unloadability](https://github.com/dotnet/coreclr/pull/22221) document. @@ -521,9 +516,9 @@ Loading dependent assemblies from a given path was not supported in .NET Core. N * Improved security due to the removal of various obsolete and insecure cryptographic algorithms and encryption of more of the connection handshake. -.NET Core 3.0 Preview 1 is capable of utilizing **OpenSSL 1.1.1**, **OpenSSL 1.1.0**, or **OpenSSL 1.0.2** (whatever the best version found is, on a Linux system). When **OpenSSL 1.1.1** is available the SslStream and HttpClient types will use **TLS 1.3** when using `SslProtocols.None` (system default protocols), assuming both the client and server support **TLS 1.3**. +.NET Core 3.0 is capable of utilizing **OpenSSL 1.1.1**, **OpenSSL 1.1.0**, or **OpenSSL 1.0.2** (whatever the best version found is, on a Linux system). When **OpenSSL 1.1.1** is available the SslStream and HttpClient types will use **TLS 1.3** when using `SslProtocols.None` (system default protocols), assuming both the client and server support **TLS 1.3**. -The following sample demonstrates .NET Core 3.0 Preview 1 on Ubuntu 18.10 connecting to : +The following sample demonstrates .NET Core 3.0 on Ubuntu 18.10 connecting to : ```csharp using System; @@ -611,7 +606,7 @@ Console.WriteLine($"AES-GCM: Decrypted data is{(dataToEncrypt.SequenceEqual(decr ## Cryptographic Key Import/Export -.NET Core 3.0 Preview 1 supports the import and export of asymmetric public and private keys from standard formats, without needing to use an X.509 certificate. +.NET Core 3.0 supports the import and export of asymmetric public and private keys from standard formats, without needing to use an X.509 certificate. All key types (RSA, DSA, ECDsa, ECDiffieHellman) support the **X.509 SubjectPublicKeyInfo** format for public keys, and the **PKCS#8 PrivateKeyInfo** and **PKCS#8 EncryptedPrivateKeyInfo** formats for private keys. RSA additionally supports **PKCS#1 RSAPublicKey** and **PKCS#1 RSAPrivateKey**. The export methods all produce DER-encoded binary data, and the import methods expect the same. If a key is stored in the text-friendly PEM format, the caller will need to base64-decode the content before calling an import method. @@ -680,7 +675,7 @@ The `Span`, `Memory`, and related types that were introduced in .NET Core Additionally, types like `String` have seen under-the-cover improvements to make them more efficient when used as keys with `Dictionary` and other collections. No code changes are required to benefit from these improvements. -The following improvements are also new in .NET Core 3 Preview 1: +The following improvements are also new in .NET Core 3.0: * Brotli support built in to HttpClient * ThreadPool.UnsafeQueueWorkItem(IThreadPoolWorkItem)