![]() |
|
Blazor WebAssembly 3.2.0 Release Candidate now available - Printable Version +- Sick Gaming (https://sickgaming.net) +-- Forum: Programming (https://sickgaming.net/forum-76.html) +--- Forum: C#, Visual Basic & .NET (https://sickgaming.net/forum-79.html) +--- Thread: Blazor WebAssembly 3.2.0 Release Candidate now available (/thread-94835.html) |
Blazor WebAssembly 3.2.0 Release Candidate now available - xSicKxBot - 05-01-2020 Blazor WebAssembly 3.2.0 Release Candidate now available Daniel April 30th, 2020 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! Here’s what’s new in this release:
Get started To get started with Blazor WebAssembly 3.2.0 Release Candidate, install the latest .NET Core 3.1 SDK. Quote:NOTE: Version 3.1.201 or later of the .NET Core SDK is required to use this Blazor WebAssembly release! Make sure you have the correct .NET Core SDK version by running Once you have the appropriate .NET Core SDK installed, run the following command to install the updated Blazor WebAssembly template: Code: dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-rc1.20223.4If you’re on Windows using Visual Studio, we recommend installing the latest preview of Visual Studio 2019 16.6. 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. That’s it! You can find additional docs and samples on https://blazor.net. Upgrade an existing project To upgrade an existing Blazor WebAssembly app from 3.2.0 Preview 5 to the 3.2.0 Release Candidate:
You’re all set! Custom boot resource loading 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: loadBootResourceCode: <script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script> 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 } });
</script>If you want to customize more than just the URLs that are being used, then your Code: loadBootResourceCode: <script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script> 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' } }); } });
</script>API reference docs for the Blazor WebAssembly namespaces ( Code: Microsoft.AspNetCore.Components.WebAssembly.*Known issues
Feedback 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 GitHub. We hope you enjoy the Blazor WebAssembly Release Candidate and thanks for trying out Blazor! |