Skip to content

Commit 80cf245

Browse files
committed
Add comment explaining the new template test
1 parent 791a82f commit 80cf245

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ public async Task BlazorWebTemplate_Works(BrowserKind browserKind, string intera
2929

3030
if (HasClientProject())
3131
{
32-
// TODO: Remove this when LazyAssemblyLoader is no longer being used.
32+
// In order to prevent an exception casued by missing LazyAssemblyLoader during pre-rendering,
33+
// we are registering it into DI in AddInteractiveWebAssemblyComponents.
34+
// To avoid adding new references between assemblies we try to resolve the type during run-time using reflection.
35+
// This assert is here to check that the assembly containing LazyAssemblyLoader is actually present in a standard app
36+
// created from the Blazor Web template.
37+
// See https://github.com/dotnet/aspnetcore/issues/51966.
38+
// TODO: Remove this when LazyAssemblyLoader is no longer being used, or the dependency graph changes so reflection is no longer needed.
3339
AssertServerProjectCanUseLazyAssemblyLoader(GetTargetProject(project));
3440
}
3541

0 commit comments

Comments
 (0)