Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blazor WebAssembly 3.2.0 Release Candidate now available

#1
Blazor WebAssembly 3.2.0 Release Candidate now available

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/05/blazor-webassembly-3-2-0-release-candidate-now-available.jpg" width="150" height="150" 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/2020/05/blazor-webassembly-3-2-0-release-candidate-now-available.jpg" width="58" height="58" alt="Daniel Roth" class="avatar avatar-58 wp-user-avatar wp-user-avatar-58 alignnone photo"></p>
<p>Daniel</p>
</div>
</div>
</div>
<div class="entry-meta">
<p>April 30th, 2020</p>
</p></div>
<p><!-- .entry-meta --> </p>
<p>The Blazor WebAssembly Release Candidate is here! This release contains all of the features and improvements that we expect to release for the upcoming Blazor WebAssembly release. There are no more breaking changes planned at this point. Please give the Blazor WebAssembly Release Candidate a try and let us know what you think!</p>
<p>Here’s what’s new in this release:</p>
<ul>
<li>Custom boot resource loading</li>
<li>API reference docs</li>
</ul>
<h2>Get started</h2>
<p>To get started with Blazor WebAssembly 3.2.0 Release Candidate, install the latest <a href="https://dotnet.microsoft.com/download/dotnet-core/3.1">.NET Core 3.1 SDK</a>.</p>
<blockquote>
<p>NOTE: Version 3.1.201 or later of the .NET Core SDK is <strong>required</strong> to use this Blazor WebAssembly release! Make sure you have the correct .NET Core SDK version by running <code>dotnet --version</code> from a command prompt.</p>
</blockquote>
<p>Once you have the appropriate .NET Core SDK installed, run the following command to install the updated Blazor WebAssembly template:</p>
<pre><code>dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-rc1.20223.4
</code></pre>
<p>If you’re on Windows using Visual Studio, we recommend <a href="https://visualstudio.com/preview">installing the latest preview of Visual Studio 2019 16.6</a>. For this preview, you should still install the template from the command-line as described above to ensure that the Blazor WebAssembly template shows up correctly in Visual Studio and on the command-line.</p>
<p>That’s it! You can find additional docs and samples on <a href="https://blazor.net">https://blazor.net</a>.</p>
<h2>Upgrade an existing project</h2>
<p>To upgrade an existing Blazor WebAssembly app from 3.2.0 Preview 5 to the 3.2.0 Release Candidate:</p>
<ul>
<li>Update all Microsoft.AspNetCore.Components.WebAssembly.* package references to version 3.2.0-rc1.20223.4.</li>
<li>Update any Microsoft.AspNetCore.Components.WebAssembly.Runtime package references to version 3.2.0-rc1.20222.2 (having a reference to this package is uncommon).</li>
<li>Update all System.Net.Http.Json package references to 3.2.0-rc1.20217.1</li>
</ul>
<p>You’re all set!</p>
<h2>Custom boot resource loading</h2>
<p>When a Blazor WebAssembly app loads in the browser, it first downloads all of the required boot resources from the server, including the .NET runtime, the bootstrapping JavaScript code, locale specific data, and the .NET assemblies that make up the app. You can now customize how these boot resources are loading using the <code>loadBootResource</code> API. You can use this API to make any needed modifications to how these specific outbound requests are constructed. For example, you might want to load some of the resources from an external CDN. Although Microsoft does not currently host the Blazor framework files on any specific public Content Delivery Network (CDN), you are free to add them to your own CDN if you wish. For example, if you have published the <em>_framework\wasm</em> files to a CDN within the base URL https://mycdn.example.com/blazorwebassembly/3.2.0-rc1/, then you could configure your application to use those resources as follows:</p>
<pre><code class="html">&lt;script src="_framework/blazor.webassembly.js" autostart="false"&gt;&lt;/script&gt;
&lt;script&gt; Blazor.start({ loadBootResource: function (type, name, defaultUri, integrity) { console.log(`Will load '${type}' with name '${name}' from URI '${defaultUri}' and integrity '${integrity}'`); switch (type) { case 'dotnetjs': case 'dotnetwasm': case 'timezonedata': return `https://mycdn.external.cdn/blazorwebassembly/3.2.0-rc1/${name}`; } // Other types are 'assembly' and 'pdb' but you probably wouldn't want to fetch those from a CDN as they would be custom-linked for your app // By returning undefined for other types, we let the framework use its normal strategy for those types } });
&lt;/script&gt;
</code></pre>
<p>If you want to customize more than just the URLs that are being used, then your <code>loadBootResource</code> function can call fetch directly and return the result. For example:</p>
<pre><code class="html">&lt;script src="_framework/blazor.webassembly.js" autostart="false"&gt;&lt;/script&gt;
&lt;script&gt; Blazor.start({ loadBootResource: function (type, name, defaultUri, integrity) { // Adds a custom HTTP header to the outbound requests // To retain the default integrity checking behavior, it's necessary to pass through the 'integrity' parameter return fetch(defaultUri, { cache: 'no-cache', integrity: integrity, headers: { 'MyCustomHeader': 'My custom value' } }); } });
&lt;/script&gt;
</code></pre>
<h2>API reference docs</h2>
<p>API reference docs for the Blazor WebAssembly namespaces (<code>Microsoft.AspNetCore.Components.WebAssembly.*</code>) are now available in the .NET API browser as part of the <a href="https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-3.1">ASP.NET Core 3.1 API docs</a>.</p>
<h2>Known issues</h2>
<ul>
<li>
<p>When publishing a ASP.NET Core hosted Blazor WebAssembly app using Visual Studio, satellite assemblies from the client application do not get copied to the publish folder.</p>
<p>This issue will be addressed in the upcoming release. To workaround this issue, publish the app from the command line using <code>dotnet publish</code>.</p>
</li>
</ul>
<h2>Feedback</h2>
<p>This is our last planned preview release of Blazor WebAssembly 3.2! We need your help to make sure that we’ve addressed any remaining blocking issues for the upcoming release. Please give it a try and let us know what you think by filing issues on <a href="https://github.com/dotnet/aspnetcore/issues">GitHub</a>.</p>
<p>We hope you enjoy the Blazor WebAssembly Release Candidate and thanks for trying out Blazor!</p>
</div>


https://www.sickgaming.net/blog/2020/04/...available/
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016