Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASP.NET Core updates in .NET 5 Release Candidate 2

ASP.NET Core updates in .NET 5 Release Candidate 2

<div style="margin: 5px 5% 10px 5%;"><img src="" width="150" height="150" title="" alt="" /></div><div><div class="row justify-content-center">
<div class="col-md-4">
<div><img loading="lazy" src="" width="58" height="58" alt="Daniel Roth" class="avatar avatar-58 wp-user-avatar wp-user-avatar-58 alignnone photo"></p>
<div class="entry-meta entry-meta-layout">
<p>October 13th, 2020</p>
<p><!-- .entry-meta --> </p>
<p><a href="">.NET 5 Release Candidate 2 (RC2) is now available</a> and is ready for evaluation. .NET 5 RC2 is a “go live” release, meaning it’s supported in production. This prerelease of .NET 5 is very close to what we expect to ship for the .NET 5 release.</p>
<p>Here’s what’s new in this RC2 release:</p>
<li>CSS isolation improvements</li>
<li>Blazor WebAssembly debugging improvements</li>
<li>Browser platform compatibility tooling</li>
<p>ASP.NET Core in .NET 5 contains lots of great new functionality and improvements! The list below summarizes the many improvements we’ve made in ASP.NET Core for .NET 5 that you can try out in this release:</p>
<p>See the <a href="">.NET 5 release notes</a> for additional details and known issues.</p>
<h2 id="get-started">Get started</h2>
<p>To get started with ASP.NET Core in .NET 5 RC2, <a href="">install the .NET 5 SDK</a>. .NET RC2 also is included with Visual Studio 2019 16.8 Preview 4.</p>
<p><a href="">Visual Studio 2019 16.8 Preview 4</a> or later is required to use .NET 5 RC2 from Visual Studio. .NET 5 RC2 is also supported with the latest <a href="">preview</a> of <a href="">Visual Studio for Mac</a>. To use .NET 5 with <a href="">Visual Studio Code</a>, install the latest version of the <a href="">C# extension</a>.</p>
<h2 id="upgrade-an-existing-project">Upgrade an existing project</h2>
<p>To upgrade an existing ASP.NET Core app from .NET 5 RC1 to .NET 5 RC2:</p>
<li>Update all Microsoft.AspNetCore.* package references to <code>5.0.0-rc.2.*</code>.</li>
<li>Update all Microsoft.Extensions.* package references to <code>5.0.0-rc.2.*</code>.</li>
<li>Update System.Net.Http.Json package references to <code>5.0.0-rc.2.*</code>.</li>
<li>Update Microsoft.AspNetCore.Components.Web.Extensions package references to <code>5.0.0-preview9.20513.1</code>.</li>
<li>Remove any package references to Microsoft.AspNetCore.Components.ProtectedBrowserStorage</li>
<li>Update <code>Microsoft.AspNetCore.Components.ProtectedBrowserStorage</code> namespace to <code>Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage</code>.</li>
<li>Remove unnecessary service registrations for <code>ProtectedLocalStorage</code> and <code>ProtectedSessionStorage</code>.</li>
<li>Rename <code>JSObjectReference</code> to <code>IJSObjectReference</code>.</li>
<li>In Blazor apps, replace CSS references to <em>_framework/scoped.styles.css</em> and <em>_content/{project_name}/_framework/scoped.styles.css</em> with <em>{project_name}.styles.css</em>.</li>
<p>That’s it! You should be all ready to go.</p>
<p>See also the full list of <a href="">breaking changes</a> in ASP.NET Core for .NET 5.</p>
<h2 id="whats-new">What’s new?</h2>
<h3 id="blazor-css-isolation-improvements">Blazor CSS isolation improvements</h3>
<p>In .NET 5 Preview 8 we introduced support for CSS isolation for Blazor components. Based on user feedback, we’ve made a number of improvements to CSS isolation in this release.</p>
<p>Previously, all component scoped CSS files including files from referenced projects or packages were compiled into a single bundle, <em>scoped.styles.css</em>. We now produce one bundle per referenced project or package and include those bundles into the app bundle through CSS <code>@import</code> statements.</p>
<p>The bundle names are now based on the project names: <em>{project_name}.styles.css</em>. Each bundle can be referenced from the root path of the app by default. This makes the path of the app bundle the same for both Blazor Server and Blazor WebAssembly projects:</p>
<pre><code class="html">&lt;link href="BlazorApp1.styles.css" rel="stylesheet" /&gt;
<p>Component specific styles can also now use normal <code>wwwroot</code>-relative paths to refer to related assets, like images. We’ve updated Razor Class Library template to make use of component specific styles following this pattern.</p>
<pre><code class="css">.my-component { border: 2px dashed red; padding: 1em; margin: 1em 0; background-image: url('background.png');
<p>We also fixed some issues with how scoped CSS styles get built so that changes are correctly picked up with each build in Visual Studio instead of requiring a full rebuild.</p>
<h3 id="blazor-webassembly-debugging-improvements">Blazor WebAssembly debugging improvements</h3>
<p>.NET 5 includes a variety of improvements to Blazor WebAssembly debugging:</p>
<li>Various reliability improvements, including fixing the <a href="">port conflict issue</a> from RC1</li>
<li>Improved support for stepping over and out of async methods</li>
<li>Inspect locals or object properties in many previously unsupported situations:
<li>For inherited members</li>
<li>For multicast delegates</li>
<li>For boxed values</li>
<li>For <code>Nullable&lt;T&gt;</code> values</li>
<li>Within reflection based calls</li>
<li>Support for debugging lazy loaded assemblies</li>
<h3 id="browser-platform-compatibility-tooling">Browser platform compatibility tooling</h3>
<p>The core framework libraries in .NET 5 have now been annotated to indicate which APIs are supported in browser scenarios. The platform compatibility analyzer uses this data to give appropriate warnings when using APIs from a Blazor WebAssembly app that are not supported when running in a browser on WebAssembly.</p>
<p><img src="" alt="Browser compatibility check"></p>
<p>Learn more about how you can use the new platform compatibility analyzer to <a href="">discover cross-platform compatibility issues</a>.</p>
<h2 id="give-feedback">Give feedback</h2>
<p>We hope you enjoy this release of ASP.NET Core in .NET 5! We are eager to hear about your experiences with this latest .NET 5 release. Let us know what you think by filing issues on <a href="">GitHub</a>.</p>
<p>Thanks for trying out ASP.NET Core!</p>

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016