Skip to content

Commit 463c60a

Browse files
committed
Blazor WebAssembly
1 parent 3cad761 commit 463c60a

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
################################################################################
2+
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3+
################################################################################
4+
5+
.vs/

dynamic-linq.net/pages/getting-started/_sidebar.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
- Advanced Usage
1212
- [Configuration](advanced/configuration.md)
1313
- [Localization](advanced/localization.md)
14-
- [Null Propagating](advanced/null-propagation.md)
14+
- [Null Propagating](advanced/null-propagation.md)
15+
- [Blazor WebAssembly](advanced/blazor-webassembly.md)
1516
- [Entity Framework](advanced/entity-framework.md)
1617
- [Extending](advanced/extending.md)
1718
- [Parse Lambda](advanced/parse-lambda.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
Permalink: advanced-blazor-webassembly
3+
Name: Blazor WebAssembly
4+
---
5+
6+
# Blazor WebAssembly
7+
8+
It is possible to use the Dynamic LINQ (`System.Linq.Dynamic.Core`) library in a Blazor WebAssembly client project.
9+
10+
However you can run into the issues as described below, read further on how to fix this.
11+
12+
13+
## Issue(s)
14+
15+
When running the Blazor WebAssembly client project in **Release** mode, you can get errors in the console like this:
16+
``` js
17+
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
18+
Unhandled exception rendering component: Operator '&&' incompatible with operand types 'Boolean' and 'Boolean'
19+
Operator '&&' incompatible with operand types 'Boolean' and 'Boolean' (at index 21)
20+
```
21+
22+
## Solution
23+
24+
The solution for these issue is in most cases to add the following line to the `.csproj` client project:
25+
``` xml
26+
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>
27+
```
28+
29+
If you want more fine-grained control on which assembles are linked, see [this link](https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/configure-linker?view=aspnetcore-3.1#control-linking-with-a-configuration-file).

0 commit comments

Comments
 (0)