Comments (9)
Hopefully #454 will be merged soon, so it will work out of the box.
from templates.
@mikes-gh isn't the problem related because the template is using rc libs. I'm slightly surprised it went like this in prod
from templates.
I did ask for them to be updated :-(
But thats not the problem in this case cause I updated them to 8.0.1 and the problem remains
edit it is the problem
from templates.
@ScarletKuro You are right. After a clean and rebuild with 8.0.1 the issue is resolved
from templates.
I had to also clean obj and bin folders
from templates.
#453 (comment)
This worked for me.
from templates.
I am seeing the same error as initially described. Cleaning and rebuilding does not fix it for me. Also, I see it in every single, freshly created MudBlazor project. Here's what I did:
- In Visual Studio, I create a new project using the template "MudBlazor Web App (MudBlazor)", with .NET 8.0, no authentication and interactive render mode "Auto (Server and WebAssembly)", globally set:
Once it's created, I change nothing at all and start debugging (F5):
- After the first loading, it works: hiding/showing the sidebar, switching over to the counter page, increasing count by clicking the button.
- As soon as I reload or start the second debugging session (or each time after that), there's no interactivity any more (clicking the three-bars-symbol to hide the sidebar does nothing, neither does clicking the counter button), and a JSON error appears in the console:
(Also, the CSS file gets a 404 now).
-
Clicking the sidebar link "Counter" shows a lot of errors in the console:
-
This happens across all the browsers I've tried: Firefox, Brave, Edge. I've tried this in Visual Studio 2022 (17.8.6) as well as VS Code 1.86.0 - it's exactly same everywhere: First run after creating the project is okay, second and every after that fails.
-
My installed .NET SDK is 8.0.101.
-
MudBlazor templates installed are the latest (0.6.5).
-
I'm using Windows 11 Pro (23H2).
To rule out a configuration problem, I have uninstalled .NET entirely and made a clean install. I did the same with Visual Studio (removed completely and did a clean install). It changed nothing. I've used MudBlazor with .NET 6 and never experienced any problems like this.
Also, when using the "original" Blazor Web App template that comes with Visual Studio, applying the same settings as above, it works without a problem, no matter how often I reload / restart. The same goes for the Fluent UI template: It works both server side as well as after the switch to client side - so clearly, there's an issue with MudBlazor somehow...
My impression is that something goes/is wrong with the way WebAssembly render mode is configured/hooked in (since the problem occurs after the first reload, i.e. after the switch from server side to client side. Sadly, I cound't figure out what "the other" templates (the "original" one or Fluent UI) do differently regarding this...
I do think that MudBlazor is fantastic, and I'd really, really love to use this rather than Bootstrap (oiriginal template) or Fluent UI. So - how could this problem best be tackled?
Thanks to everybody investing tehir time to work on MudBlazor and to help other people!
from templates.
@philipp-koch have you updated the underlying libraries (Microsoft.AspNetCore.Components.WebAssembly.Server
, Microsoft.AspNetCore.Components.WebAssembly
and all other MS libraries) to 8.0.1
as the issue suggests? Then clear obj
/ bin
/ .vs
(hidden) folders, clean browser cache etc.
from templates.
@ScarletKuro Thank you for pointing this out so clearly - I was mistaken, thinking "8.0.1" referred to the installed .NET SDK! So, I've taken a look at the NuGet package manager, and indeed the mentioned packages were still the RC versions, not 8.0.1. I have updated them, performed clean and rebuild for the solution, cleared the browser cache - and voilà, it works now! So, in other words: "Amazing, just do it right and all of a sudden it works!" (Kaum macht man's richtig, schon funktioniert's...) 🤣
I'm a little embarassed now, but more importantly, I'm really happy this could be solved (so easily)...
Thanks for your quick and helpful reply!
from templates.
Related Issues (20)
- Extra Project Generated when making WASM-PWA-Hosted Project HOT 2
- Null reference exception when using NavigationManager with HeadOutlet HOT 3
- InvalidOperationException HOT 1
- MudBlazor.Templates does not support Blazor webassembly .net7 HOT 2
- When will the template be upgraded to .Net 7 (or 8) HOT 6
- Inline styles in Blazor Server
- .Net 8 Templates for WebApp and MAUI HOT 1
- Template not found HOT 18
- Rendering does not Work correclty in "InteractivityAuto_AlliInteractive_auth" HOT 2
- Invalid options (from Tutorial) HOT 1
- Logout code not included. HOT 3
- No Exception information shown HOT 1
- Template With Auth and MudBlazor Components
- Templates with multiple .csproj files (i.e. Auto and Wasm) break when created inside of a directory that follows kebab case naming convention (i.e. my-mudblazor-project).
- Filtering and paging Datagrid not working HOT 1
- Interactivity does not work in MudBlazor WASM template for Visual Studio for .NET 8 HOT 7
- PWA not working
- Authentication pages cause the app not to update mudblazor layers properly HOT 2
- Add material design 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.