How do you include a Blazor component library?

In Visual Studio 2019’s latest preview, create an ASP.NET Core web application and choose the Razor Class Library template with ASP.NET Core 3.0. Refer to this Microsoft link for more information.

Why is _framework/blazor.webassembly.js not found in the deployed Blazor applications?

You  have to update the virtual app path or app base path in index.html to resolve this issue. That is, the hosted application expects the assets from root folder of the web server. So, you have to update the subfolder name in index.html to serve the files from the path. For example, if I am hosting the application in http://example.com/blazor/, the index.html looks like the following. For more information, refer to the link for updating app-base-path.

My deployed Blazor application only shows “Loading…” Why is the deployed Blazor application not working?

You must update the virtual app path or app base path in index.html to resolve this issue. That is, the hosted application expects the assets from root folder of the web server. So, you have to update the subfolder name in index.html to serve the files from the path. For example, if I am hosting an application in http://example.com/blazor/, the index.html looks like the following. For more information, refer to this link for updating app-base-path.

How do I get event data in Blazor?

Blazor provides a set of event argument types that map to events. By using this event argument types we can get the event data for the specific event. For example, you need to use KeyboardEventArgs to get the event data for the keypress event in the input element for every key press. Refer to this Visual Studio Magazine link for more events and event args.