[Blazor] JS initializers declared in RCLs run twice #57087
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Milestone
Summary
JS initializers declared in a Razor Class Libraries have each of their callbacks executed twice.
Steps to reproduce
dotnet new blazor -int None -o ./BlazorApp -f net8.0
dotnet new razorclasslib -o ./RazorClassLibrary -f net8.0
dotnet add ./BlazorApp/BlazorApp.csproj reference ./RazorClassLibrary/RazorClassLibrary.csproj
./RazorClassLibrary/wwwroot/RazorClassLibrary.lib.module.js
and add the following content:dotnet run --project .\BlazorApp\BlazorApp.csproj
dotnet new globaljson --sdk-version 8.0.303
dotnet run --project .\BlazorApp\BlazorApp.csproj
Other notes
net9.0
TFMThe text was updated successfully, but these errors were encountered: