{"id":33788,"date":"2021-08-10T15:17:07","date_gmt":"2021-08-10T22:17:07","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=33788"},"modified":"2021-08-11T14:03:59","modified_gmt":"2021-08-11T21:03:59","slug":"announcing-net-6-preview-7","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-6-preview-7\/","title":{"rendered":"Announcing .NET 6 Preview 7"},"content":{"rendered":"<p>We are delighted to release .NET 6 Preview 7. It is the last preview before we enter the (two) Release Candidate (RC) period. The team has been burning the midnight oil and the candle at both ends getting the last set of features in before we slow the speed down on the release. It&#8217;s also the release where you will see the last bit of polish on various features and large it-took-the-whole-release features come in all at once. From this point, the team will be focused on bringing all the features to uniform (high) quality so that .NET 6 is ready for your production workloads.<\/p>\n<p>On the topic of production workloads, it&#8217;s worth reminding everyone that both the <a href=\"https:\/\/dotnet.microsoft.com\">.NET website<\/a> and <a href=\"https:\/\/bing.com\">Bing.com<\/a> have been running on .NET 6 since Preview 1. We&#8217;re in talks with various teams (Microsoft and otherwise) about going into production with the .NET 6 RCs. If you are interested in that and want guidance on how to approach that, please reach out at dotnet@microsoft.com. We&#8217;re always happy to talk to early adopters.<\/p>\n<p>You can <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/6.0\">download .NET 6 Preview 7<\/a> for Linux, macOS, and Windows.<\/p>\n<ul>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/6.0\">Installers and binaries<\/a><\/li>\n<li><a href=\"https:\/\/hub.docker.com\/_\/microsoft-dotnet\">Container images<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/release-notes\/6.0\/install-linux.md\">Linux packages<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/release-notes\/6.0\/README.md\">Release notes<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/tree\/main\/release-notes\/6.0\/preview\/api-diff\/preview7\">API diff<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/release-notes\/6.0\/known-issues.md\">Known issues<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/issues\/6554\">GitHub issue tracker<\/a><\/li>\n<\/ul>\n<p>See the <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-maui-preview-7\/\">.NET MAUI<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/asp-net-core-updates-in-net-6-preview-7\/\">ASP.NET Core<\/a> for more detail on what\u2019s new for client and web application scenarios.<\/p>\n<p>.NET 6 Preview 7 has been tested and is supported with <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/vs2022\/\">Visual Studio 2022 Preview 3<\/a>. Visual Studio 2022 enables you to leverage the Visual Studio tools developed for .NET 6 such as development in .NET MAUI, Hot Reload for C# apps, new Web Live Preview for WebForms, and other performance improvements in your IDE experience. .NET 6 is also supported with <a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/dotnet\">Visual Studio Code<\/a>. The latest version of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-dotnettools.csharp\">C# extension for Visual Studio Code<\/a> has been updated for .NET 6 Preview 7 and includes support for C# 10.<\/p>\n<p>Check out the new <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/category\/conversations\/\">conversations posts<\/a> for in-depth engineer-to-engineer discussions on the latest .NET features. We also published posts on <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/string-interpolation-in-c-10-and-net-6\/\">String Interpolation in C# 10 and .NET 6<\/a>\u00a0 <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/preview-features-in-net-6-generic-math\/\">Preview Features in .NET 6 \u2013 Generic Math<\/a>.<\/p>\n<h2>.NET SDK: C# project templates modernized<\/h2>\n<p>We <a href=\"https:\/\/github.com\/dotnet\/templating\/issues\/3359\">updated .NET SDK templates<\/a> to use the latest C# language features and patterns. We hadn&#8217;t revisited the templates in terms of new language features in a while. It was time to do that and we&#8217;ll ensure that the templates use new and modern features going forward.<\/p>\n<p>The following language features are used in the new templates:<\/p>\n<ul>\n<li>Top-level statements<\/li>\n<li>async Main<\/li>\n<li>Global using directives (via SDK driven defaults)<\/li>\n<li>File-scoped namespaces<\/li>\n<li>Target-typed new expressions<\/li>\n<li>Nullable reference types<\/li>\n<\/ul>\n<p>You might wonder why we enable certain features via templates instead of enabling them by default when a project targets .NET 6. We&#8217;re OK with requiring some amount of work on your part to upgrade applications to a new version of .NET as a tradeoff for improving the default behavior of the platform. This allows us improve the product without complicating project files over time. However, some features can be quite disruptive with that model, such as nullable reference types. We don&#8217;t want to tie those features to the upgrade experience, but want to leave that choice to you, both when and if ever. The templates are a much lower risk pivot point, where we&#8217;re able to set what the new &#8220;good default model&#8221; is for new code without nearly as much downstream consequence. By enabling these features via project templates, we&#8217;re getting the best of both worlds: new code starts with these features enabled but existing code isn&#8217;t impacted when you upgrade.<\/p>\n<h3>Console template<\/h3>\n<p>The <code>console<\/code> template demonstrates the biggest change. It&#8217;s now (effectively) a one-liner by virtue of top-level statements and global using directives.<\/p>\n<pre><code class=\"language-csharp\">\/\/ See https:\/\/aka.ms\/new-console-template for more information\r\nConsole.WriteLine(\"Hello, World!\");<\/code><\/pre>\n<p>The .NET 5 version of the same template includes several lines of familiar ceremony that provide the structure previously necessary for even a single line of actual code.<\/p>\n<pre><code class=\"language-csharp\">using System;\r\n\r\nnamespace Company.ConsoleApplication1\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            Console.WriteLine(\"Hello, World!\");\r\n        }\r\n    }\r\n}<\/code><\/pre>\n<p>The project file for the <code>console<\/code> template has also changed, to enable the <a href=\"https:\/\/docs.microsoft.com\/dotnet\/csharp\/nullable-references\">nullable reference types<\/a> feature, as you can see in the following example.<\/p>\n<pre><code class=\"language-xml\">&lt;Project Sdk=\"Microsoft.NET.Sdk\"&gt;\r\n\r\n  &lt;PropertyGroup&gt;\r\n    &lt;OutputType&gt;Exe&lt;\/OutputType&gt;\r\n    &lt;TargetFramework&gt;net6.0&lt;\/TargetFramework&gt;\r\n    &lt;Nullable&gt;enable&lt;\/Nullable&gt;\r\n  &lt;\/PropertyGroup&gt;\r\n\r\n&lt;\/Project&gt;<\/code><\/pre>\n<p>Other templates also enable nullability, implicit global usings, and file scoped namespaces, including ASP.NET Core and Class Library.<\/p>\n<h3>ASP.NET web template<\/h3>\n<p>The <code>web<\/code> template is also similarly reduced in lines of code, using the same features.<\/p>\n<pre><code class=\"language-csharp\">var builder = WebApplication.CreateBuilder(args);\r\nvar app = builder.Build();\r\n\r\nif (app.Environment.IsDevelopment())\r\n{\r\n    app.UseDeveloperExceptionPage();\r\n}\r\n\r\napp.MapGet(\"\/\", () =&gt; \"Hello World!\");\r\n\r\napp.Run();<\/code><\/pre>\n<h3>ASP.NET MVC template<\/h3>\n<p>The <code>mvc<\/code> template is similar in structure. In this case, we&#8217;ve merged <code>Program.cs<\/code> and <code>Startup.cs<\/code> into a single file (<code>Program.cs<\/code>), creating a further simplification.<\/p>\n<pre><code class=\"language-csharp\">var builder = WebApplication.CreateBuilder(args);\r\n\r\n\/\/ Add services to the container.\r\nbuilder.Services.AddControllersWithViews();\r\n\r\nvar app = builder.Build();\r\n\r\n\/\/ Configure the HTTP request pipeline.\r\nif (app.Environment.IsDevelopment())\r\n{\r\n    app.UseDeveloperExceptionPage();\r\n}\r\nelse\r\n{\r\n    app.UseExceptionHandler(\"\/Home\/Error\");\r\n    \/\/ The default HSTS value is 30 days. You may want to change this for production scenarios, see https:\/\/aka.ms\/aspnetcore-hsts.\r\n    app.UseHsts();\r\n}\r\n\r\napp.UseHttpsRedirection();\r\napp.UseStaticFiles();\r\n\r\napp.UseRouting();\r\n\r\napp.UseAuthorization();\r\n\r\napp.MapControllerRoute(\r\n    name: \"default\",\r\n    pattern: \"{controller=Home}\/{action=Index}\/{id?}\");\r\n\r\napp.Run();<\/code><\/pre>\n<h3>Template compatibility<\/h3>\n<p>See the following documents for compatibility concerns with using the new templates.<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/compatibility\/sdk\/6.0\/csharp-template-code\">C# code in templates not supported by earlier .NET versions<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/compatibility\/sdk\/6.0\/implicit-namespaces\">Implicit namespace imports<\/a><\/li>\n<\/ul>\n<h2>Libraries: Reflection APIs for nullability information<\/h2>\n<p><a href=\"https:\/\/docs.microsoft.com\/dotnet\/csharp\/nullable-references\">Nullable reference types<\/a> is an important feature for writing reliable code. It works great for writing code but not (until now) for inspecting it. <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/29723\">New Reflection APIs<\/a> enable you to determine the nullability nature of parameters and return values for a given method. These new APIs will be critical for Reflection-based tools and serializers, for example.<\/p>\n<p>For context, we added <a href=\"https:\/\/twitter.com\/JeffHandley\/status\/1424846146850131968\">nullable annotations to the .NET Libraries<\/a> in .NET 5 (and finished up in .NET 6) and are in the process of doing same with <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/issues\/27389\">ASP.NET Core<\/a> this release. We also see <a href=\"https:\/\/github.com\/jellyfin\/jellyfin\/blob\/c07e83fdf87e61f30e4cca4e458113ac315918ae\/Directory.Build.props#L5\">developers adopting nullability<\/a> for their projects.<\/p>\n<p>Nullability information is persisted in <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/main\/docs\/features\/nullable-metadata.md\">metadata using custom attributes<\/a>. In principle, anyone can already read the custom attributes, however, this is not ideal because the encoding is non-trivial to consume.<\/p>\n<p>The following examples demonstrate using the new APIs for a couple different scenarios.<\/p>\n<h3>Getting top-level nullability information<\/h3>\n<p>Imagine you&#8217;re implementing a serializer. Using these new APIs the serializer can check whether a given property can be set to <code>null<\/code>:<\/p>\n<pre><code class=\"language-C#\">private NullabilityInfoContext _nullabilityContext = new NullabilityInfoContext();\r\n\r\nprivate void DeserializePropertyValue(PropertyInfo p, object instance, object? value)\r\n{\r\n    if (value is null)\r\n    {\r\n        var nullabilityInfo = _nullabilityContext.Create(p);\r\n        if (nullabilityInfo.WriteState is not NullabilityState.Nullable)\r\n        {\r\n            throw new MySerializerException($\"Property '{p.GetType().Name}.{p.Name}'' cannot be set to null.\");\r\n        }\r\n    }\r\n\r\n    p.SetValue(instance, value);\r\n}<\/code><\/pre>\n<h3>Getting nested nullability information<\/h3>\n<p>Nullability has special treatment for objects that can (formally) hold other objects, like arrays and tuples. For example, you can specify that an array object (as a variable, or as part of a type member signature) must be non-null but that the elements can be null, or vice versa. This extra level of specificity is inspectable with the new Reflection APIs, as you see demonstrated in the following example.<\/p>\n<pre><code class=\"language-C#\">class Data\r\n{\r\n    public string?[] ArrayField;\r\n    public (string?, object) TupleField;\r\n}\r\nprivate void Print()\r\n{\r\n    Type type = typeof(Data);\r\n    FieldInfo arrayField = type.GetField(\"ArrayField\");\r\n    FieldInfo tupleField = type.GetField(\"TupleField\");\r\n\r\n    NullabilityInfoContext context = new ();\r\n\r\n    NullabilityInfo arrayInfo = context.Create(arrayField);\r\n    Console.WriteLine(arrayInfo.ReadState);        \/\/ NotNull\r\n    Console.WriteLine(arrayInfo.Element.State);    \/\/ Nullable\r\n\r\n    NullabilityInfo tupleInfo = context.Create(tupleField);\r\n    Console.WriteLine(tupleInfo.ReadState);                      \/\/ NotNull\r\n    Console.WriteLine(tupleInfo.GenericTypeArguments [0].State); \/\/ Nullable\r\n    Console.WriteLine(tupleInfo.GenericTypeArguments [1].State); \/\/ NotNull\r\n}<\/code><\/pre>\n<h2>Libraries: ZipFile Respects Unix File Permissions<\/h2>\n<p>The <code>System.IO.Compression.ZipFile<\/code> class now captures Unix file permissions during create and set file permissions when extracting zip archives on Unix-like operating systems. This change allows for executable files to be round-tripped through a zip archive, which means you no longer have to modify file permissions to make files executable after extracting a zip archive. It also respects the read\/write permissions for <code>user<\/code>, <code>group<\/code>, and <code>other<\/code> as well.<\/p>\n<p>If a zip archive doesn&#8217;t contain file permissions (because it was created on Windows, or using a tool which didn&#8217;t capture the permissions, like an earlier version of .NET) extracted files get the default file permissions, just like any other newly created file.<\/p>\n<p>The Unix file permissions work with other zip archive tools as well, including:<\/p>\n<ul>\n<li><a href=\"https:\/\/sourceforge.net\/projects\/infozip\/\">Info-ZIP<\/a><\/li>\n<li><a href=\"https:\/\/www.7-zip.org\/\">7-Zip<\/a><\/li>\n<\/ul>\n<h2>Early .NET 7 Feature Preview: Generic Math<\/h2>\n<p>For .NET 6, we&#8217;ve built the capability to <a href=\"https:\/\/github.com\/dotnet\/designs\/blob\/main\/accepted\/2021\/preview-features\/preview-features.md\">mark APIs as &#8220;in preview&#8221;<\/a>. This new approach will allow us to offer and evolve preview features across multiple major releases. In order to use preview APIs, projects need to explicitly opt-into using preview features. If you use preview features without explicitly opting-in, you will see build errors with actionable messages, starting in .NET 6 RC1. Preview features are expected to change, likely in breaking ways, in later releases. That&#8217;s why they are opt-in.<\/p>\n<p>One of those features we&#8217;re previewing in .NET 6 is static abstract interface members. Those allow you to define static abstract methods (including operators) in interfaces. For example, it is now possible to implement algebraic generic methods. For some folks, this feature will be the absolute standout improvement we&#8217;re delivering this year. It is perhaps the most important new type system capability since <code>Span&lt;T&gt;<\/code>.<\/p>\n<p>The following example takes an <code>IEnumerable&lt;T&gt;<\/code> and is able to sum all the values due to the <code>T<\/code> being constrained to <code>INumber&lt;T&gt;<\/code>, possibly an <code>INumber&lt;int&gt;<\/code>.<\/p>\n<pre><code class=\"language-csharp\">public static T Sum&lt;T&gt;(IEnumerable&lt;T&gt; values)\r\n    where T : INumber&lt;T&gt;\r\n{\r\n    T result = T.Zero;\r\n\r\n    foreach (var value in values)\r\n    {\r\n        result += value;\r\n    }\r\n\r\n    return result;\r\n}<\/code><\/pre>\n<p>This works because <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/main\/src\/libraries\/System.Private.CoreLib\/src\/System\/INumber.cs\"><code>INumber&lt;T&gt;<\/code><\/a> defines various (static) <a href=\"https:\/\/docs.microsoft.com\/dotnet\/csharp\/language-reference\/operators\/operator-overloading\">operator overloads<\/a> that must be satisfied by interface implementors. The <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/main\/src\/libraries\/System.Private.CoreLib\/src\/System\/IAdditionOperators.cs\"><code>IAdditionOperators<\/code><\/a> is perhaps the easiest new interface to understand, which <code>INumber&lt;T&gt;<\/code> itself is derived from.<\/p>\n<p>This is all powered by a new feature which allows <code>static abstract<\/code> members to be declared in interfaces. This enables interfaces to expose operators and other static methods, such as <code>Parse<\/code> or <code>Create<\/code>, and for those to be implemented by a derived type. Please see our <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/preview-features-in-net-6-generic-math\/\">associated blog post<\/a> for more details!<\/p>\n<p>All of the features mentioned are in preview for .NET 6 and not supported for use in production. We would appreciate your feedback using them. We intend to continue evolving and improving the generic math features and the runtime and C# features that support them in .NET 7. We expect to make breaking changes to the current experience, and that&#8217;s part of the reason why the new APIs are marked as &#8220;in preview&#8221;.<\/p>\n<h2>Libraries: NativeMemory APIs<\/h2>\n<p>We added new <a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54006\">native memory allocation APIs<\/a> exposed via <code>System.Runtime.InteropServices.NativeMemory<\/code>. These APIs represent equivalents to the <code>malloc<\/code>, <code>free<\/code>, <code>realloc<\/code>, and <code>calloc<\/code> C APIs and also includes APIs for doing aligned allocations.<\/p>\n<p>You may be wondering about how to think about these APIs. First, they are low-level APIs that are intended for low-level code and algorithms. Application developers would rarely if ever use these. Another way to think about these APIs is similarly to the <a href=\"https:\/\/github.com\/dotnet\/designs\/blob\/main\/accepted\/2018\/platform-intrinsics.md\">platform intrinsic<\/a> APIs, which are low-level .NET APIs for chip instructions. These APIs are similar but expose low-level APIs for memory-related operations.<\/p>\n<h2>Libraries: System.Text.Json serialization notifications<\/h2>\n<p>The System.Text.Json serializer now exposes notifications as part of (de)serialization operations. They are useful for defaulting values and validation. To use them, implement one or more of the interfaces <code>IJsonOnDeserialized<\/code>, <code>IJsonOnDeserializing<\/code>, <code>IJsonOnSerialized<\/code> or <code>IJsonOnSerializing<\/code> within the <code>System.Text.Json.Serialization<\/code> namespace.<\/p>\n<p>Here&#8217;s an example that validates during both <code>JsonSerializer.Serialize()<\/code> and <code>JsonSerializer.Deserialize()<\/code> to ensure a <code>FirstName<\/code> property is not <code>null<\/code>.<\/p>\n<pre><code class=\"language-cs\">  public class Person : IJsonOnDeserialized, IJsonOnSerializing\r\n  {\r\n      public string FirstName{ get; set; }\r\n\r\n      void IJsonOnDeserialized.OnDeserialized() =&gt; Validate(); \/\/ Call after deserialization\r\n      void IJsonOnSerializing.OnSerializing() =&gt; Validate(); \/\/ Call before serialization\r\n\r\n      private void Validate()\r\n      {\r\n          if (FirstName is null)\r\n          {\r\n              throw new InvalidOperationException(\"The 'FirstName' property cannot be 'null'.\");\r\n          }\r\n      }\r\n  }<\/code><\/pre>\n<p>Previously, you would need to implement a custom converter to achieve this functionality.<\/p>\n<h2>Libraries: System.Text.Json serialization property ordering<\/h2>\n<p>We&#8217;ve also added the ability to control the serialization order of properties, with <code>System.Text.Json.Serialization.JsonPropertyOrderAttribute<\/code>. An integer specifies the order. Smaller integers are serialized first; properties that have no attribute have a default ordering value of 0.<\/p>\n<p>Here&#8217;s an example that specifies JSON should be serialized in the order <code>Id, City, FirstName, LastName<\/code>:<\/p>\n<pre><code class=\"language-cs\">public class Person\r\n{\r\n    public string City { get; set; } \/\/ No order defined (has the default ordering value of 0)\r\n\r\n    [JsonPropertyOrder(1)] \/\/ Serialize after other properties that have default ordering\r\n    public string FirstName { get; set; }\r\n\r\n    [JsonPropertyOrder(2)] \/\/ Serialize after FirstName\r\n    public string LastName { get; set; }\r\n\r\n    [JsonPropertyOrder(-1)] \/\/ Serialize before other properties that have default ordering\r\n    public int Id { get; set; }\r\n}<\/code><\/pre>\n<p>Previously, the serialization order was determined by reflection order which was neither deterministic nor resulting in a specific desired order.<\/p>\n<h2>Libraries: &#8220;write raw&#8221; JSON with System.Text.Json.Utf8JsonWriter<\/h2>\n<p>There are times when you need to <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/1784\">integrate &#8220;raw&#8221; JSON when writing JSON payloads<\/a> with Utf8JsonWriter.<\/p>\n<p>For example:<\/p>\n<ul>\n<li>I have a deliberate sequence of bytes I want to write out on the wire, and I know what I&#8217;m doing (as demonstrated in the following example).<\/li>\n<li>I have a blob which I think represents JSON content and which I want to envelope, and I need to make sure the envelope &amp; its inner contents remain well-formed<\/li>\n<\/ul>\n<pre><code class=\"language-cs\">JsonWriterOptions writerOptions = new() { WriteIndented = true, };\r\n\r\nusing MemoryStream ms = new();\r\nusing UtfJsonWriter writer = new(ms, writerOptions);\r\n\r\nwriter.WriteStartObject();\r\nwriter.WriteString(\"dataType\", \"CalculationResults\");\r\n\r\nwriter.WriteStartArray(\"data\");\r\n\r\nforeach (CalculationResult result in results)\r\n{\r\n    writer.WriteStartObject();\r\n    writer.WriteString(\"measurement\", result.Measurement);\r\n\r\n    writer.WritePropertyName(\"value\");\r\n    \/\/ Write raw JSON numeric value using FormatNumberValue (not defined in the example)\r\n    byte[] formattedValue = FormatNumberValue(result.Value);\r\n    writer.WriteRawValue(formattedValue, skipValidation: true);\r\n\r\n    writer.WriteEndObject();\r\n}\r\n\r\nwriter.WriteEndArray();\r\nwriter.WriteEndObject();<\/code><\/pre>\n<p>The following is a description of what the code above &#8212; particularly <code>FormatNumberValue<\/code> &#8212; is doing. For performance, <code>System.Text.Json<\/code> omits the decimal points\/values when the number is whole, like <code>1.0<\/code>. The rationale is that writing fewer bytes is good for perf. In some scenarios, it might be important to retain decimal values because the consumer treats numbers without decimals as integers, otherwise as doubles. This new &#8220;raw value&#8221; model allows you to have that level of control wherever you need it.<\/p>\n<h2>Libraries: Synchronous stream overloads on <code>JsonSerializer<\/code><\/h2>\n<p>We&#8217;ve added <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/1574\">new synchronous APIs<\/a> to <code>JsonSerializer<\/code> for serializing and deserializing JSON data to\/from a stream. You can see that demonstrated in the following example.<\/p>\n<pre><code class=\"language-cs\">using MemoryStream ms = GetMyStream();\r\nMyPoco poco = JsonSerializer.Deserialize&lt;MyPoco&gt;(ms);<\/code><\/pre>\n<p>These new synchronous APIs include overloads that are compatible and usable with the new <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/try-the-new-system-text-json-source-generator\/\">System.Text.Json source generator<\/a>, by accepting <code>JsonTypeInfo&lt;T&gt;<\/code> or <code>JsonSerializerContext<\/code> instances.<\/p>\n<h2>Libraries: System.Text.Json.Nodes.JsonNode support for <code>dynamic<\/code> is removed<\/h2>\n<p>Support for the C# <a href=\"https:\/\/docs.microsoft.com\/dotnet\/csharp\/language-reference\/builtin-types\/reference-types#the-dynamic-type\"><code>dynamic<\/code><\/a> type in the JsonSerializer has been removed. We added <code>dynamic<\/code> support in Preview 4 but later decided to be a poor design choice, including making it a required dependency of the <code>JsonNode<\/code> type.<\/p>\n<p>This change is considered a <a href=\"https:\/\/github.com\/dotnet\/docs\/issues\/25105\">breaking change<\/a> from a .NET 6 preview to preview standpoint but not from .NET 5 to 6.<\/p>\n<h2>Libraries: System.Diagnostics Propagators<\/h2>\n<p>We&#8217;ve been improving support for <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/opentelemetry-net-reaches-v1-0\/\">OpenTelemetry<\/a> over the last couple years. One of the key aspects of enabling great support is ensuring that all components that need to participate in telemetry production produce network headers in the right format. It&#8217;s really hard to do that, particularly as the OpenTelemetry specification changes. OpenTelemetry defines the <a href=\"https:\/\/opentelemetry.lightstep.com\/core-concepts\/context-propagation\/\">propagation<\/a> concept to help with this situation. We&#8217;re in the process of adopting <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/50658\">propagation<\/a> to enable a general model for header customization.<\/p>\n<p>Context on the broader concepts:<\/p>\n<ul>\n<li><a href=\"https:\/\/opentelemetry.io\/\">OpenTelemetry<\/a> specification &#8212; In-memory representation of the distributed tracing data structures.<\/li>\n<li><a href=\"https:\/\/opentelemetry.lightstep.com\/spans\/\">OpenTelemetry Span<\/a> &#8212; Building block for a trace, and represented by <a href=\"https:\/\/docs.microsoft.com\/dotnet\/api\/system.diagnostics.activity\">System.Diagnostics.Activity<\/a> in .NET.<\/li>\n<li><a href=\"https:\/\/www.w3.org\/TR\/trace-context\/\">W3C TraceContext<\/a> &#8212; Spec on how to propagate these distributed tracing data structures over well-know HTTP headers.<\/li>\n<\/ul>\n<p>The following code demonstrates the general approach for using propagation.<\/p>\n<pre><code class=\"language-C#\">DistributedContextPropagator propagator = DistributedContextPropagator.Current;\r\npropagator.Inject(activity, carrier, (object theCarrier, string fieldName, string value) =&gt;\r\n{\r\n   \/\/ Extract the context from the activity then inject it to the carrier.\r\n});<\/code><\/pre>\n<p>You can also choose to use a different propagator.<\/p>\n<pre><code class=\"language-C#\">\/\/ Set the current propagation behavior to not transmit any distributed context information in outbound network messages.\r\nDistributedContextPropagator.Current = DistributedContextPropagator.CreateNoOutputPropagator();<\/code><\/pre>\n<p>The <code>DistributedContextPropagator<\/code> abstract class determines if and how distributed context information is encoded and decoded as it traverses the network. The encoding can be transported over any network protocol that supports key-value string pairs. <code>DistributedContextPropagator<\/code> inject values into and extracts values from carriers as key\/value string pairs.\nBy adding support for propagators, we&#8217;ve enabled two things:<\/p>\n<ul>\n<li>You&#8217;re no longer required to use the <a href=\"https:\/\/www.w3.org\/TR\/trace-context\/\">W3C TraceContext<\/a> headers. You can write a custom propagator (i.e., use your own headers names including not sending them at all) without the libraries HttpClient, ASP.NET Core having a priori knowledge of this custom format<\/li>\n<li>If you implement a library with a custom transport (e.g., message queue), you can now support various wire formats as long as you support sending and receiving a text map (e.g. <code>Dictionary&lt;string, string&gt;<\/code>)<\/li>\n<\/ul>\n<p>Most application code does not need to directly use this feature, however, it is likely that you will see it in a call-stack if you use OpenTelemetry. Some library code will want to participate in this model if it cares about tracing and causality.<\/p>\n<h2>Libraries: Simplified call patterns for cryptographic operations<\/h2>\n<p>The .NET encryption and decryption routines were designed around streaming, with no real concept for defining when the payload is already in memory. The new Encrypt- and Decrypt- methods on <code>SymmetricAlgorithm<\/code> accelerate the already-in-memory case, and are intended to provide clarity to the caller and the code reviewer. Additionally, they support reading from and writing to spans.<\/p>\n<p>The new simplified methods offer a straightforward approach to using cryptographic APIs:<\/p>\n<pre><code class=\"language-C#\">private static byte[] Decrypt(byte[] key, byte[] iv, byte[] ciphertext)\r\n{\r\n    using (Aes aes = Aes.Create())\r\n    {\r\n        aes.Key = key;\r\n\r\n        return aes.DecryptCbc(ciphertext, iv);\r\n    }\r\n}<\/code><\/pre>\n<p>With the new Encrypt- and Decrypt-methods, only the key property is used from the SymmetricAlgorithm instance. The new DecryptCbc method supports choosing the padding algorithm, but PKCS#7 is used with CBC so often that it&#8217;s a default argument. If you like the clarity, just specify it:<\/p>\n<pre><code class=\"language-C#\">private static byte[] Decrypt(byte[] key, byte[] iv, byte[] ciphertext)\r\n{\r\n    using (Aes aes = Aes.Create())\r\n    {\r\n        aes.Key = key;\r\n\r\n        return aes.DecryptCbc(ciphertext, iv, PaddingMode.PKCS7);\r\n    }\r\n}<\/code><\/pre>\n<p>You can see that the existing pattern &#8212; with .NET 5 &#8212; required significantly more plumbing for the same outcome.<\/p>\n<pre><code class=\"language-C#\">private static byte[] Decrypt(byte[] key, byte[] iv, byte[] ciphertext)\r\n{\r\n    using (Aes aes = Aes.Create())\r\n    {\r\n        aes.Key = key;\r\n        aes.IV = iv;\r\n\r\n        \/\/ These are the defaults, but let's set them anyways.\r\n        aes.Padding = PaddingMode.PKCS7;\r\n        aes.Mode = CipherMode.CBC;\r\n\r\n        using (MemoryStream destination = new MemoryStream())\r\n        using (ICryptoTransform transform = aes.CreateDecryptor())\r\n        using (CryptoStream cryptoStream = new CryptoStream(destination, transform, CryptoStreamMode.Write))\r\n        {\r\n            cryptoStream.Write(ciphertext, 0, ciphertext.Length);\r\n            cryptoStream.FlushFinalBlock();\r\n            return destination.ToArray();\r\n        }\r\n    }\r\n}<\/code><\/pre>\n<h2>Libraries: Full Case Mapping Support in Globalization Invariant Mode<\/h2>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/main\/docs\/design\/features\/globalization-invariant-mode.md\">Globalization Invariant Mode<\/a> enables you to remove application dependencies on globalization data and behavior in exchange for smaller applications (primarily on Linux). We&#8217;ve <a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/compatibility\/globalization\/6.0\/culture-creation-invariant-mode\">improved Globalization Invariant Mode<\/a> to support case mapping of the full Unicode character set. Previously, this mode only supported ASCII range characters for operations like <code>String.ToUpper<\/code>, <code>String.ToLower<\/code>, and string comparisons and searching with the <a href=\"https:\/\/docs.microsoft.com\/dotnet\/api\/system.globalization.compareoptions\">IgnoreCase option<\/a>.<\/p>\n<p>Alpine-based .NET container images are the only environment where we <a href=\"https:\/\/github.com\/dotnet\/dotnet-docker\/blob\/b7eeae802bcf3b9793ae49992ce4bb8d16c504c8\/src\/runtime-deps\/5.0\/alpine3.13\/arm32v7\/Dockerfile#L20\">enable globalization environment mode by default<\/a>.<\/p>\n<h2>Runtime: W^X (write xor execute) support for all platforms and architectures<\/h2>\n<p>The runtime now has a mode in which it doesn&#8217;t create or use any memory pages that are writeable and executable at the same time. All executable memory is mapped as read-execute only. This feature was enabled on macOS &#8212; for Apple Silicon &#8212; earlier in the release. On Apple Silicon machines, memory mappings that are writeable and executable at the same time are prohibited.<\/p>\n<p>This capability is now enabled and supported on all other platforms as an opt-in experience. On these platforms, executable code generation \/ modification is done via separate read-write memory mappings. This is true for both JIT&#8217;d code and runtime-generated helpers. These mappings are created at virtual memory addresses that are different from the executable code address and exist only for a very brief period of time when the writing is performed. For example, the JIT now generates code into a scratch buffer that is copied into the executable memory using a single memory copy function call after the whole method is jitted. And the writeable mapping lifetime spans only the time of the memory copy.<\/p>\n<p>This new feature can be enabled by setting the environment variable <code>DOTNET_EnableWriteXorExecute<\/code> to <code>1<\/code>. This feature is opt-in in .NET 6 because it has a startup regression (except on Apple Silicon). The regression is ~10% in our ASP.Net benchmark tests when compiled with Ready To Run (R2R). However, the steady state performance was measured to be the same with and without the feature enabled. For applications where startup performance isn&#8217;t critical, we recommend enabling this feature for the improved security that it offers. We intend to resolve the performance regression as part of .NET 7 and enable the feature by default at that time.<\/p>\n<h2>Runtime: CodeGen changelog<\/h2>\n<p>The following changes were made in code generation in Preview 7.<\/p>\n<h3>Community PRs<\/h3>\n<p>The following PRs were all from <a href=\"https:\/\/github.com\/SingleAccretion\">@SingleAccretion<\/a>:<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53040\" data-error-text=\"Failed to load title\" data-id=\"897293167\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53040\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53040\/hovercard\">Optimize\u00a0<code>CAST(int &lt;- long)<\/code>\u00a0on 32 bit targets<span class=\"issue-shorthand\">\u00a0runtime#53040<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/52561\" data-error-text=\"Failed to load title\" data-id=\"884974068\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/52561\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/52561\/hovercard\">Eliminate chained casts to small types<span class=\"issue-shorthand\">\u00a0runtime#52561<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53464\" data-error-text=\"Failed to load title\" data-id=\"906486636\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53464\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53464\/hovercard\">Remove some unneeded code from division morphing<span class=\"issue-shorthand\">\u00a0runtime#53464<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53566\" data-error-text=\"Failed to load title\" data-id=\"908913935\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53566\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53566\/hovercard\">Fix CQ regression &amp; correctness bug in morphing of long muls<span class=\"issue-shorthand\">\u00a0runtime#53566<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53667\" data-error-text=\"Failed to load title\" data-id=\"910297922\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53667\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53667\/hovercard\">Do not eliminate casts from FP types when optimizing narrow stores<span class=\"issue-shorthand\">\u00a0runtime#53667<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53778\" data-error-text=\"Failed to load title\" data-id=\"912579839\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53778\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53778\/hovercard\">Move the &#8220;do not zero-extend setcc&#8221; optimization to lower<span class=\"issue-shorthand\">\u00a0runtime#53778<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/53782\" data-error-text=\"Failed to load title\" data-id=\"912751477\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/53782\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/53782\/hovercard\">Disable folding of implementation-defined casts<span class=\"issue-shorthand\">\u00a0runtime#53782<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54108\" data-error-text=\"Failed to load title\" data-id=\"919649195\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/54108\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/54108\/hovercard\">Add args descriptions for VNF_MapStore and VNF_MapSelect<span class=\"issue-shorthand\">\u00a0runtime#54108<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54539\" data-error-text=\"Failed to load title\" data-id=\"927057631\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/54539\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/54539\/hovercard\">Import\u00a0<code>cgt.un(op, 0)<\/code>\u00a0as\u00a0<code>NE(op, 0)<\/code><span class=\"issue-shorthand\">\u00a0runtime#54539<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55632\" data-error-text=\"Failed to load title\" data-id=\"944248442\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55632\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55632\/hovercard\">Use local assertion prop to omit casts on returns<span class=\"issue-shorthand\">\u00a0runtime#55632<\/span><\/a><\/span><\/li>\n<\/ul>\n<h2><span style=\"color: inherit; font-family: inherit; font-size: 1.75rem;\">Dynamic PGO<\/span><\/h2>\n<p>The following PRs support the <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/43618\">dynamic PGO project<\/a>.<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/52708\" data-error-text=\"Failed to load title\" data-id=\"891178086\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/52708\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/52708\/hovercard\">[JIT] Improve inliner: new heuristics, rely on PGO data<span class=\"issue-shorthand\">\u00a0runtime#52708<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55478\" data-error-text=\"Failed to load title\" data-id=\"941524469\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55478\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55478\/hovercard\">Inliner: Extend IL limit for profiled call-sites, allow inlining for switches.<span class=\"issue-shorthand\">\u00a0runtime#55478<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55660\" data-error-text=\"Failed to load title\" data-id=\"944673170\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55660\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55660\/hovercard\">JIT: enable GDV when static class deduction fails.<span class=\"issue-shorthand\">\u00a0runtime#55660<\/span><\/a><\/span><\/li>\n<\/ul>\n<h3>LSRA<\/h3>\n<p>The following PRs support the <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/43318\">LRSA project<\/a>.<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54345\" data-error-text=\"Failed to load title\" data-id=\"924141857\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/54345\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/54345\/hovercard\">Spill single-def variable at definition to avoid further spilling<span class=\"issue-shorthand\">\u00a0runtime#54345<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54998\" data-error-text=\"Failed to load title\" data-id=\"934543651\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/54998\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/54998\/hovercard\">Mark vars as do not enreg earlier in minopts.<span class=\"issue-shorthand\">\u00a0runtime#54998<\/span><\/a><\/span><\/li>\n<\/ul>\n<h3>Loop Optimization<\/h3>\n<p>The following PRs improve loop optimization.<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55299\" data-error-text=\"Failed to load title\" data-id=\"939326328\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55299\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55299\/hovercard\">Improve loop cloning, with debugging improvements<span class=\"issue-shorthand\">\u00a0runtime#55299<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55612\" data-error-text=\"Failed to load title\" data-id=\"943925117\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55612\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55612\/hovercard\">Support cloning loops with array of struct indexing expressions<span class=\"issue-shorthand\">\u00a0runtime#55612<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55614\" data-error-text=\"Failed to load title\" data-id=\"943941909\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55614\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55614\/hovercard\">Increase max loops optimized by RyuJIT from 16 to 64.<span class=\"issue-shorthand\">\u00a0runtime#55614<\/span><\/a><\/span><\/li>\n<\/ul>\n<h3>Structs<\/h3>\n<p>The following PRs improve struct handling.<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55045\" data-error-text=\"Failed to load title\" data-id=\"935272186\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55045\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55045\/hovercard\">Enregister structs on win x64.<span class=\"issue-shorthand\">\u00a0runtime#55045<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55535\" data-error-text=\"Failed to load title\" data-id=\"942472881\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55535\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55535\/hovercard\">Enreg structs x86 windows.<span class=\"issue-shorthand\">\u00a0runtime#55535<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55558\" data-error-text=\"Failed to load title\" data-id=\"942977902\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55558\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55558\/hovercard\">Enable StructEnreg by default on all platforms.<span class=\"issue-shorthand\">\u00a0runtime#55558<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/55727\" data-error-text=\"Failed to load title\" data-id=\"945257987\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/55727\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/55727\/hovercard\">Improve\u00a0<code>TryTransformStoreObjAsStoreInd<\/code>\u00a0optimization.<span class=\"issue-shorthand\">\u00a0runtime#55727<\/span><\/a><\/span><\/li>\n<\/ul>\n<h3>Optimizations<\/h3>\n<p>The following PRs provide general optimizations.<\/p>\n<ul>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/49548\" data-error-text=\"Failed to load title\" data-id=\"830394063\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/49548\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/49548\/hovercard\">&#8220;==0&#8221; optimization in Boolean logic #13573<span class=\"issue-shorthand\">\u00a0runtime#49548<\/span><\/a><\/span><\/li>\n<li><span class=\"reference\"><a class=\"issue-link js-issue-link\" href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/54864\" data-error-text=\"Failed to load title\" data-id=\"932049317\" data-permission-text=\"Title is private\" data-url=\"https:\/\/github.com\/dotnet\/runtime\/issues\/54864\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"\/dotnet\/runtime\/pull\/54864\/hovercard\">Allow implicit widenings when tailcalling<span class=\"issue-shorthand\">\u00a0runtime#54864<\/span><\/a><\/span><\/li>\n<\/ul>\n<h2>Contributor Showcase<\/h2>\n<p>We&#8217;re coming &#8212; as mentioned multiple times &#8212; to the end of the release. We thought we&#8217;d take a few moments to showcase some community contributors who have been significant contributions. There are many folks who have contributed significantly. The following folks were nominated for this showcase from a few folks on the team. We can continue with this showcase section if people like it.<\/p>\n<p>The text is written in the contributor&#8217;s own words.<\/p>\n<h3>Andrii Kurdiumov (@kant2002)<\/h3>\n<p>I&#8217;m <a href=\"https:\/\/github.com\/kant2002\">Andrii Kurdiumov<\/a>, and I&#8217;m living in Almaty, Kazakhstan. By trade I work on building new products in enterprise space.<\/p>\n<p>I decided to contribute to .NET because I see opportunities to enter new markets with new MS technologies. Blazor WebAssembly and .NET on Raspberry are working well, but I fear these technologies can break under extreme or unusual requirements. So I decided to invest a bit of my time and check if NativeAOT can help me. So far, my contributions mostly centered around NativeAOT project, even WinForms one. And for some time I plan to follow that direction.<\/p>\n<p>Those were the reasons why I started contributing. Reasons why I continue contributing are the following: I constantly feel support from people working on .NET, I know that they have a lot of experience in the vast areas of software dev. And people working around .NET care a great deal about high quality standards and that immediately set the tone for anybody around. I personally like these kinds of environments.<\/p>\n<h3>SingleAccretion<\/h3>\n<p><a href=\"https:\/\/github.com\/SingleAccretion\">I am an aspiring young programmer<\/a>, from, as surprisingly many of us .NET people are, Russia. As a person writing code, I&#8217;ve started with .NET and progressively went from the higher layers of the stack to lower ones, ending up working on the compiler, just at the edge of the void that is the VM :), . It is a rather fascinating kind of activity, understanding the system as complex and old as RyuJit, but that is also its unique draw, I suppose, at least for curious people like myself.<\/p>\n<p>However, that is not the reason why I contribute to .NET, after all, I could&#8217;ve just started my own fork. I think it would be fair of me to say, having waded through so many GH threads throughout these months, that is not at any place one can see people with such deep and rich understanding of the problems in our field. Becoming part of this community, and being able to reason the problems that are reasoned about in it, is something I truly treasure.<\/p>\n<h2>Closing<\/h2>\n<p>We&#8217;re at that point in the release where we consider new features and improvements done. Nice work, team. That&#8217;s a wrap on another season of .NET previews.<\/p>\n<p>We continue to want and rely on your feedback. We will focus the rest of .NET 6 on regressions (functional and performance) and bugs found in the new features. Functional improvements in most cases will need to wait for .NET 7. Please share any and all feedback you have and we&#8217;ll be happy to categorize it.<\/p>\n<p>Thanks for everyone who has contributed to making .NET 6 another great release.<\/p>\n<p>Thanks for being a .NET developer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET 6 Preview 7 is now available.<\/p>\n","protected":false},"author":1312,"featured_media":33181,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,196],"tags":[],"class_list":["post-33788","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-dotnet-core"],"acf":[],"blog_post_summary":"<p>.NET 6 Preview 7 is now available.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/1312"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=33788"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33788\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/33181"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=33788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=33788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=33788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}