Remove dependency on System.Console in default Blazor WASM app #31148
Closed
Description
There is a single place in a Blazor WASM app that references System.Console
:
This place is the main entry point for the application, and it catches all exceptions and writes them to the console. Since it is the only place that references System.Console
in the application, if we can change this code to not reference System.Console
, the whole System.Console.dll
assembly can be removed, which is currently at 6KB .br compressed.
One idea on how to remove this is to use Mono's built-in functionality for invoking the Main entrypoint instead of having that functionality in ASP.NET.