Stroomtang
Stroomtang

Reputation: 300

Blazor FluentUI content files not updating

I have a Blazor app (running mostly in Interactive Server mode) which uses the FluentUI components heavily. I was running version 4.3.1 (on .NET 8.0.2) and wanted to upgrade this to a newer version (4.4.1). Then suddenly I got JSInterop errors; a component tried to run a JS function but couldn't find it. I checked FluentUI's source code on github for this component and yes, this was updated and a new JS function was created. In my browser's developer tools I went to sources -> _content folder and noticed it still used this 'old' .js file, without the new JS function.

So now my question is: how do I update these '_content' files?? I thought updating the FluentUI NuGet from 4.3.1 to 4.4.0 should do the job, but clearly it doesn't. I tried shift-F5 in my browser, cleaned my VS solution, removed the Microsoft.FluentUI.AspNetCore.Components-folder in my %userprofile%.nuget\packages folder, uninstalled and reinstalled the Microsoft.FluentUI.AspNetCore.Components nuget,... I don't know why it doesn't want to use the new .js files which should be included in the new version. Also, when I publish to my Azure Web App service it's exactly the same: still uses the 'old' .js files.

Can someone shed a light on this?

Thank you!

EDIT: So it turns out it's the browser at fault here, it keeps using the old cached .js file. A CTRL+F5 re-downloads the 'main' Microsoft.FluentUI.AspNetCore.Components.lib.module.js-file, but still relies on the cached FluentTextField.razor.js:

enter image description here

So how do I prevent using this cached version?

Upvotes: 2

Views: 294

Answers (1)

Gary Chan
Gary Chan

Reputation: 558

You need to perform a hard refresh in browser. That forces a browser cache refresh.

For Edge and Chrome, select the tab, then Ctrl-shift-R on a PC or Command-shift-R on a Mac.

Upvotes: 0

Related Questions