Skip to content

Commit 5d24076

Browse files
committed
There is a bug in mono linker where the assembly is added even if its getting removed by the compiler.
This breaks the lazy loading since assemblies are now added to the boot sequence. Disabling the linker fixes the issue, which I guess its ok.
1 parent 21b8b60 commit 5d24076

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
File renamed without changes.

demo/ServerHost/ServerHost.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>
56
</PropertyGroup>
67

8+
<ItemGroup>
9+
<BlazorLinkerDescriptor Include="LinkerConfig.xml" />
10+
</ItemGroup>
11+
712
<Import Project="../BlazorLazyLoading.Server.props" />
813

914
<!-- Extra dependencies -->

demo/WasmHost/WasmHost.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RazorLangVersion>3.0</RazorLangVersion>
6-
<BlazorWebAssemblyEnableLinking>true</BlazorWebAssemblyEnableLinking>
6+
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<BlazorLinkerDescriptor Include="LinkerConfig.xml" />
1111
</ItemGroup>
1212

1313
<Import Project="../BlazorLazyLoading.Wasm.props" />
14+
<Import Project="../BlazorLazyLoading.Components.props" />
1415

1516
<!-- Extra dependencies -->
1617
<ItemGroup>
@@ -22,8 +23,8 @@
2223

2324
<!-- Modules -->
2425
<ItemGroup>
25-
<ProjectReference Include="..\Core\Core.csproj" />
26-
<ProjectReference Include="..\ModulesHost\ModulesHost.csproj" />
26+
<ProjectReference Include="..\Core\Core.csproj" />
27+
<ProjectReference Include="..\ModulesHost\ModulesHost.csproj" Private="false" />
2728
</ItemGroup>
2829

2930
</Project>

0 commit comments

Comments
 (0)