Could not find 'Radzen.createChart' ('Radzen' was undefined)

As some others, I also ran into an 'could not find ...' issue. But my Blazor Server Side app works in Development environment, but when I switch to Staging, the error is thrown. I did include Radzen.Blazor.js, even before blazor.server.js and clearing the cache does not help.

The only difference between Development and Staging environment that I know of is the database connection, which is for some strange reason very slow in Staging. I have tried to initialize the data to be shown in the chart with a value of 0 (versus being null while the DB takes a few seconds to deliver the data) but this does not help. Interestingly, a RadzedButton is shown on one page (although with a different styling), but when I navigate to the page with the chart, the error occurs.

I am using .net 6 and Radzen NuGet package 3.19.10

Since the speed of the DB connection is the only differece as far as I can tell, I am out of ideas and any suggestion would be greatly appreciated.

Check using your browser dev tools network tab if Radzen.Blazor.js is loaded.

Thanks for this tip! As you suspected, Radzen.Blazor.js is not loaded (as is other static content), it returns 404. So the error is related to serving static content and not to Radzen and I need to search for the reason somewhere else.

You can check my reply in this thread: Radzen Blazor Components don't respect "custom" environments - #2 by korchev

Thanks a lot, adding UseStaticWebAssets() solved the problem! I think I would have never found this without your help!