Skip to content

Commit eb8c8f0

Browse files
docs(common): solution for WASM Preview 4
1 parent 9b0ae22 commit eb8c8f0

File tree

4 files changed

+48
-18
lines changed

4 files changed

+48
-18
lines changed

_contentTemplates/common/issues-and-warnings.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11

22
#mono-linker-issue
3-
Open the Client `.csproj` file and ensure that the following switch is present. At the moment the IL Linker needs to be disabled because of [an issue in Mono](https://github.com/mono/mono/issues/12917) that is not yet merged into the Blazor framework.
3+
Add a `Linker.xml` file to the `Client` project with the following content (make sure to use your actual app name at the end):
44

5-
**.csproj**
5+
**Linker.xml**
66

7-
<PropertyGroup>
8-
<!-- there may be other elements here -->
9-
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
10-
</PropertyGroup>
7+
<?xml version="1.0" encoding="UTF-8" ?>
8+
<!--
9+
This file specifies which parts of the BCL or Blazor packages must not be
10+
stripped by the IL Linker even if they aren't referenced by user code.
11+
-->
12+
<linker>
13+
<assembly fullname="mscorlib">
14+
<!--
15+
Preserve the methods in WasmRuntime because its methods are called by
16+
JavaScript client-side code to implement timers.
17+
Fixes: https://github.com/aspnet/Blazor/issues/239
18+
-->
19+
<type fullname="System.Threading.WasmRuntime" />
20+
</assembly>
21+
<assembly fullname="System.Core">
22+
<!--
23+
System.Linq.Expressions* is required by Json.NET and any
24+
expression.Compile caller. The assembly isn't stripped.
25+
-->
26+
<type fullname="System.Linq.Expressions*" />
27+
<type fullname="System.Linq.Queryable*" />
28+
<type fullname="System.Linq.Enumerable*" />
29+
<type fullname="System.Linq.EnumerableRewriter*" />
30+
</assembly>
31+
<!--
32+
In this example, the app's entry point assembly is listed. The assembly
33+
isn't stripped by the IL Linker.
34+
-->
35+
<assembly fullname="ClientBlazorApp.Client" />
36+
</linker>
37+
38+
#end
39+
40+
#more-on-linker
41+
You can read more about configuring the linker in MSDN: [https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/configure-linker?view=aspnetcore-3.0#control-linking-with-a-configuration-file](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/configure-linker?view=aspnetcore-3.0#control-linking-with-a-configuration-file).
42+
43+
>caution Without such a linker configuration, the linker strips aggressively extension methods and this breaks our components.
1144
#end
1245

1346

getting-started/client-blazor.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ This article explains how to get the Telerik UI for Blazor components in your **
1818
* [Add to an Existing Project](#add-to-existing-project)
1919
1. [Add a Telerik Component to a View](#add-a-telerik-component-to-a-view)
2020

21-
>caution Blazor WebAssembly (WASM) is still in preview and is not part of the .NET Core 3.1 release. Blazor WebAssembly will ship as a stable release at a future date.
22-
>
23-
>The latest version of Telerik UI for Blazor is `{{site.uiForBlazorLatestVersion}}` and it `supports` the WebAssembly update that was released with NET Core 3.1 `Preview 3`. The latest WebAssembly update - Preview 4 - released with NET Core 3.1 RTM is not supported because of severe issues in the Linker. You can read more about this in the [Framework Versions Support]({%slug framework-versions-support%}) article.
24-
>
25-
>To run a WebAssembly project with the Telerik components, keep the WASM NuGet package references pointing to the `3.1.0-preview3.19555.2` update.
26-
2721

2822
@[template](/_contentTemplates/common/get-started.md#add-latest-ms-bits-client-side-link)
2923

@@ -97,6 +91,7 @@ Now that you have a Blazor project running, it's time to [Add the Telerik compon
9791

9892
1. @[template](/_contentTemplates/common/issues-and-warnings.md#mono-linker-issue)
9993

94+
@[template](/_contentTemplates/common/issues-and-warnings.md#more-on-linker)
10095

10196

10297
Now your project can use the Telerik UI for Blazor components.

getting-started/what-you-need.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ To allow working with detached popups (for example, dropdown lists, menus, grid
125125
If you are using a **client-side Blazor** project,
126126
@[template](/_contentTemplates/common/issues-and-warnings.md#mono-linker-issue)
127127

128+
@[template](/_contentTemplates/common/issues-and-warnings.md#more-on-linker)
129+
128130
## See Also
129131

130132
* [Telerik private NuGet feed]({%slug installation/nuget%})

upgrade/framework-versions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ While the release dates and numbers of the WASM flavor often match with the .NET
3939

4040
>caption Telerik UI for Blazor versions per WASM Preview version
4141
42-
| WASM Preview version | Telerik UI for Blazor version |
43-
|---------------------------|-------------------------------|
44-
| preview 4 (3.1.0-preview4.19579.2) - release date matches .NET Core 3.1 RTM | N/A - there are major issues in the Linker that prevent our code from working in this version. |
45-
| preview 3 (3.1.0-preview3.19555.2) | 2.4.0, 2.5.0 |
46-
| preview 2 (3.1.0-preview2.19528.8) | 2.3.0 |
47-
| preview 1 (3.1.0-preview1.19506.1) | 2.2.0, 2.2.1 |
42+
| WASM Preview version | Telerik UI for Blazor version |
43+
|--------------------------------------|-------------------------------|
44+
| preview 4 (3.1.0-preview4.19579.2) | 2.5.0 |
45+
| preview 3 (3.1.0-preview3.19555.2) | 2.4.0 |
46+
| preview 2 (3.1.0-preview2.19528.8) | 2.3.0 |
47+
| preview 1 (3.1.0-preview1.19506.1) | 2.2.0, 2.2.1 |
4848

4949

5050

0 commit comments

Comments
 (0)