© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
4 replies
TrustyTea

Blazor Project Hierarchy

I currently have a server only Blazor project and I am trying to sorta start from scratch by making a new Blazor Project from a template and then put everything back where it's supposed to be. I'm making the project with both interactive modes, so it makes a
Portfolio
Portfolio
and a
Portfolio.Client
Portfolio.Client
project. Through assumption and looking around on the internet, everyone says that models and stuff should be in the server project, which makes sense. I'm having a problem referencing anything inside
Porftolio
Porftolio
from
Porftolio.Client
Porftolio.Client
though, I try to add a project reference but everything I do won't let me reference my models if I store it in that project. If I put my anything inside the
Portfolio.Client
Portfolio.Client
project, I can reference it with no problem from
Portfolio
Portfolio
, but I hear it's bad practice to put all that into the client.

I'm doing this because I'm using Identiy in my Blazor project which needs an HttpContext, and from what I'm reading, you can't get the HttpContext if you're in interactive mode. One of my components is turning interactive render mode off which shuts down my app bar and theme which is annoying, but also why I'm looking to move to a different way of handling the render mode.

I feel like I'm misunderstanding something. Any help would be greatly appreciated 🙂
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Blazor project setup
C#CC# / help
8mo ago
Formatting .CSS files in a blazor project
C#CC# / help
12mo ago
❔ Creating a hierarchy algorithm
C#CC# / help
4y ago
blazor
C#CC# / help
3y ago