Sick Gaming
ASP.NET Core updates in .NET Core 3.1 - Printable Version

+- Sick Gaming (https://www.sickgaming.net)
+-- Forum: Programming (https://www.sickgaming.net/forum-76.html)
+--- Forum: C#, Visual Basic, & .Net Frameworks (https://www.sickgaming.net/forum-79.html)
+--- Thread: ASP.NET Core updates in .NET Core 3.1 (/thread-92644.html)



ASP.NET Core updates in .NET Core 3.1 - xSicKxBot - 12-04-2019

ASP.NET Core updates in .NET Core 3.1

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/asp-net-core-updates-in-net-core-3-1.png" width="58" height="58" title="" alt="" /></div><div><div class="row justify-content-center">
<div class="col-md-4">
<div><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/asp-net-core-updates-in-net-core-3-1.png" width="58" height="58" alt="Avatar" class="avatar avatar-58 wp-user-avatar wp-user-avatar-58 photo avatar-default"></p>
<p>Sourabh</p>
</div>
</div>
</div>
<div class="entry-meta">
<p>December 3rd, 2019</p>
</p></div>
<p><!-- .entry-meta --> </p>
<p><a href="https://devblogs.microsoft.com/dotnet/announcing-net-core-3-1/">.NET Core 3.1 is now available</a> and is ready for production use! .NET Core 3.1 is a Long Term Support (LTS) release.</p>
<p>Here’s what’s new in this release for ASP.NET Core:</p>
<ul>
<li>Partial class support for Razor components</li>
<li>Pass parameters to top-level components</li>
<li>New component tag helper</li>
<li>Prevent default actions for events in Blazor apps</li>
<li>Stop event propagation in Blazor apps</li>
<li>Detailed errors during Blazor app development</li>
<li>Support for shared queues in HttpSysServer</li>
<li>Breaking changes for SameSite cookies</li>
</ul>
<p>You can find all the details about these new features in the <a href="https://docs.microsoft.com/aspnet/core/release-notes/aspnetcore-3.1">What’s new in ASP.NET Core 3.1</a> topic.</p>
<p>See the <a href="https://github.com/dotnet/core/blob/master/release-notes/3.1">release notes</a> for additional details and known issues.</p>
<h2>Get started</h2>
<p>To get started with ASP.NET Core in .NET Core 3.1 <a href="https://dotnet.microsoft.com/download/dotnet-core/3.1">install the .NET Core 3.1 SDK</a>.</p>
<p>If you’re on Windows using Visual Studio, <a href="https://visualstudio.com/vs">install Visual Studio 2019 16.4</a>. Installing Visual Studio 2019 16.4 will also install .NET Core 3.1, so you don’t need to separately install it.</p>
<h2>Upgrade an existing project</h2>
<p>To upgrade an existing ASP.NET Core app to .NET Core 3.0, follow the <a href="https://docs.microsoft.com/aspnet/core/migration/30-to-31">migrations steps in the ASP.NET Core docs</a>.</p>
<p>See the full list of <a href="https://github.com/aspnet/announcements/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A3.1.0+label%3A%22Breaking+change%22">breaking changes</a> in ASP.NET Core 3.1.</p>
<p>To upgrade an existing ASP.NET Core 3.0 RC1 project to 3.0:</p>
<ul>
<li>Update all Microsoft.AspNetCore.* and Microsoft.Extensions.* package references to 3.1.0</li>
</ul>
<p>That’s it! You should now be all set to use .NET Core 3.1!</p>
<h2>Blazor WebAssembly update</h2>
<p>Alongside this .NET Core 3.1 release, we’ve also released a Blazor WebAssembly update. Blazor WebAssembly is still in preview and is <em>not</em> part of the .NET Core 3.1 release. Blazor WebAssembly will ship as a stable release at a future date.</p>
<p>To install the latest Blazor WebAssembly template run the following command:</p>
<pre><code>dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2
</code></pre>
<p>This release of Blazor WebAssembly includes a number of new features and improvements:</p>
<ul>
<li>.NET Standard 2.1 support</li>
<li>Support for static assets in when publishing</li>
<li>iOS 13 support</li>
<li>Better linker errors</li>
<li>Attach to process debugging from Visual Studio</li>
</ul>
<h3>.NET Standard 2.1 support</h3>
<p>Blazor WebAssembly apps now target .NET Standard 2.1 by default. Using .NET Standard 2.1 libraries from a Blazor WebAssembly app is now supported within the limits of the browser security sandbox.</p>
<h3>Support for static assets in libraries when publishing</h3>
<p>Standalone Blazor WebAssembly apps now support static assets from Razor class libraries both during development and when publishing. This applies to both standalone Blazor WebAssembly apps and ASP.NET Core hosted apps. Static assets are consumed from referenced libraries using the path prefix: <code>_content/{LIBRARY NAME}/</code>.</p>
<h3>iOS 13 support</h3>
<p>Blazor WebAssembly apps now work from iOS 13 based devices. The .NET IL interpreter now uses a non-recursive implementation to prevent exceeding the size of the stack on these devices.</p>
<h3>Better linker errors</h3>
<p>The IL linker is now integrated with Blazor WebAssembly projects such that linker errors are surfaced as build errors.</p>
<h3>Attach to process debugging from Visual Studio</h3>
<p>You can now debug Blazor WebAssembly apps from Visual Studio by attaching to the browser process. Currently this experience is very manual. In a future update, we expect to enable Visual Studio to handle all of the necessary wire-up to debug a Blazor WebAssembly app when you hit F5. Also, various features of the debugging experience (like viewing locals) are not yet enabled. This is something we will be working on over the next few months.</p>
<p>To debug a running Blazor WebAssembly app from Visual Studio:</p>
<ol>
<li>Run the app <em>without</em> debugging (Ctrl-F5 instead of F5)</li>
<li>Open the Debug properties of the app and copy the HTTP app URL</li>
<li>Browse to the HTTP address (not the HTTPS address) of the app using a Chromium based browser (Edge Beta or Chrome).</li>
<li>With the browser in focus, press Shift-Alt-D and then follow the instructions to open a browser with remote debugging enabled</li>
<li>Close all other browser instances</li>
<li>In Visual Studio, select <strong>Debug &gt; Attach to Process</strong>.</li>
<li>For the <strong>Connection type</strong>, select <strong>Chrome devtools protocol websocket (no authentication)</strong>.</li>
<li>For the <strong>Connection target</strong>, paste in the HTTP address (not the HTTPS address) of the app and press <kbd>Enter</kbd> (don’t click “Find” – that does something else).</li>
<li>Select the browser process you want to debug and select Attach</li>
<li>In the Select Code Type dialog, select the code type for the specific browser you are attaching to (Edge or Chrome) and then select OK</li>
<li>Set a break point in your app (for example, in the <code>IncrementCount</code> method in the <code>Counter</code> component) and then use that part of the app to hit the breakpoint.</li>
</ol>
<p>In a later release, this process will become automated inside Visual Studio and Visual Studio Code so you can launch and attach the debugger with a single click or keystroke. Then you will no longer need to go through this detailed attachment process manually.</p>
<h2>Give feedback</h2>
<p>We hope you enjoy this release of ASP.NET Core in .NET Core 3.1! We are eager to hear about your experiences with this latest .NET Core release. Let us know what you think by filing issues on <a href="https://github.com/aspnet/aspnetcore/issues">GitHub</a>.</p>
<p>Thanks for trying out ASP.NET Core!</p>
<div class="authorinfoarea">
<div><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/12/asp-net-core-updates-in-net-core-3-1-1.png" width="96" height="96" alt="Avatar" class="avatar avatar-96 wp-user-avatar wp-user-avatar-96 photo avatar-default"></div>
</p></div>
</div>


https://www.sickgaming.net/blog/2019/12/03/asp-net-core-updates-in-net-core-3-1/