Skip to content

Commit aa2e0dc

Browse files
authored
Register LazyAssemblyLoader to DI in AddInteractiveWebAssemblyComponents (#61822)
1 parent 754e56e commit aa2e0dc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Components/WebAssembly/Server/src/Microsoft.AspNetCore.Components.WebAssembly.Server.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
<ItemGroup>
1515
<Reference Include="Microsoft.AspNetCore.Components.Endpoints" />
16+
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly" />
1617
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
1718
<Reference Include="Microsoft.AspNetCore.StaticAssets" />
1819
<Reference Include="Microsoft.NETCore.BrowserDebugHost.Transport" GeneratePathProperty="true" PrivateAssets="All" />

src/Components/WebAssembly/Server/src/WebAssemblyRazorComponentsBuilderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Microsoft.AspNetCore.Components.Authorization;
66
using Microsoft.AspNetCore.Components.Endpoints.Infrastructure;
77
using Microsoft.AspNetCore.Components.WebAssembly.Server;
8+
using Microsoft.AspNetCore.Components.WebAssembly.Services;
89
using Microsoft.Extensions.DependencyInjection.Extensions;
910

1011
namespace Microsoft.Extensions.DependencyInjection;
@@ -24,6 +25,7 @@ public static IRazorComponentsBuilder AddInteractiveWebAssemblyComponents(this I
2425
ArgumentNullException.ThrowIfNull(builder, nameof(builder));
2526

2627
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<RenderModeEndpointProvider, WebAssemblyEndpointProvider>());
28+
builder.Services.TryAddScoped<LazyAssemblyLoader>();
2729

2830
return builder;
2931
}

0 commit comments

Comments
 (0)