Blazor loads too many dlls in the background

Berat Ozaydin 0 Reputation points
2023-06-08T06:05:06.88+00:00

Hello,

Blazor is loading too many dlls in the background and therefore the opening speed is slowed down, can you help me how can I prevent it?

Uploaded files :

blazorinstallslow

Client Side Csproj :

csprojclient

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,161 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,386 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
866 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,239 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2023-06-08T15:54:28.7066667+00:00

    not really. The Blazor team continually works on reducing the startup cost. But if your code uses a nuget package it needs to downloaded the package plus all the package references references.

    Your only real option is question every package you add to a blazor app.

    0 comments No comments

  2. Zhi Lv - MSFT 32,011 Reputation points Microsoft Vendor
    2023-06-12T05:20:23.09+00:00

    Hi @Berat Ozaydin

    You can try to use Lazy loading. It is a technique that delays loading app assemblies until they are required, which can improve the app startup performance and reduce the download size. For more information, see Lazy load assemblies in ASP.NET Core Blazor WebAssembly.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Dillion

    0 comments No comments