0

I just created a new Blazor Web Assembly App with the .Net Core Hosted Option. None of the Layout or Menu were displayed. I have not made any changes templates yet.

If I create a Blazo Web Assembly App without the .Net Core Hosted Option both the Lyout and Menus are displayed.

I did a diff on the style sheets and layout pages and nothing appears to be different between the two different projects with respect to these files. Has anyone else experienced this behavior? If so do you have a suggestions on what I might be missing?

---Additional Info.

I am creating a Web assembly project and just running it straight away.

Step#1

enter image description here

Step#2

enter image description here

Step#3

enter image description here

Step#4

enter image description here

Result:

enter image description here

Just doing a web assembly without a Core Hosted and running gives this:

enter image description here

If I choose the Blazor Server App Template it also displays with the menu. I haven't made any changes to the application the was created by the template.

Thanks William

Thanks

4
  • 3
    This can happen in dev because of caching. All your apps run on the same port unless you change it (5001). CTRL-F5 usually fixes this. Whilst they look identical the attribute used for CSS isolation, assigned to the elements will be different wich both the layout and navmenu use. Commented Aug 14, 2021 at 5:37
  • 2
    Thanks for your reply. I tried CTRL-F5 to no avail. Do you have any other suggestions? This my first foray into Blazor. Commented Aug 14, 2021 at 6:40
  • 1
    Hi, it's really strange. Could you please create a new webassembly project and use a compare tool to verify any difference? What version of .net do you use? Commented Aug 14, 2021 at 8:49
  • 1
    Did you tick the PWA box or previously create a PWA on the same port? Commented Aug 14, 2021 at 9:38

1 Answer 1

0

I apologize for wasting your time. My Project had a space in its name. This resulted in the style sheet references having spaces in them as well. No Style Sheets no NavMenu. I deleted and recreated the project without the space in its name and now the pages render as expected. I should have caught this. I really appreciate all of your responses.

William

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.