© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
Denis

❔ How to properly structure projects in a multi-app MVVM solution?

I tend to structure my MVVM projects in the following way:
.
├── src/
│   ├── Applications/
│   │   ├── Cashier.Terminal.csproj
│   │   ├── Cashier.Administrator.csproj
│   │   └── ..
│   ├── Servers/
│   │   ├── Database.csproj
│   │   ├── Email.csproj
│   │   └── ..
│   ├── Libraries/
│   │   ├── Helpers/
│   │   │   └── ..
│   │   ├── Views/
│   │   │   └── ..
│   │   ├── ViewModels/
│   │   │   └── ..
│   │   ├── Models/
│   │   │   └── ..
│   │   └── Entities/
│   │       └── ..
│   └── Plugins/
│       └── ..
└── test/
.
├── src/
│   ├── Applications/
│   │   ├── Cashier.Terminal.csproj
│   │   ├── Cashier.Administrator.csproj
│   │   └── ..
│   ├── Servers/
│   │   ├── Database.csproj
│   │   ├── Email.csproj
│   │   └── ..
│   ├── Libraries/
│   │   ├── Helpers/
│   │   │   └── ..
│   │   ├── Views/
│   │   │   └── ..
│   │   ├── ViewModels/
│   │   │   └── ..
│   │   ├── Models/
│   │   │   └── ..
│   │   └── Entities/
│   │       └── ..
│   └── Plugins/
│       └── ..
└── test/

Tree structure generated using https://tree.nathanfriend.io/?s=(%27options!(%27fancy5~fullPath!false~trailingSlash5~rootDot5)~7(%277%27src%2FFApplication06T9minal3*6Administrator3*GFS9v90Database3*Email32*GFLibrarie0Help9BB88Entitie4FPlugin0G2test%2F2%27)~v9sion!%271%27)*F--%20%200s%2F*2%5Cn3.csproj40-G5!true6Cashi9.7source!8Model4*9erB4*ViewF2-G..%01GFB987654320-*

The question is whether I'm not shooting myself in the foot with this approach and whether there is a better approach?
Here are the following criteria I want my structure to comply with:
- Separation of Applications, Servers, Plugins
- An application is a program an end user interacts with
- A server is something that, e.g., is accessible via an API and is used to access the DB, or perform specialized operations such as sending an email
- Views and ViewModels will be shareable between multiple applications - they must be available as individual projects

Is it possible to achieve that in a better way?
What is the best way to structure tests (unit, integration, and application) for the projects, either with my structure or the one you propose?
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

How to Properly Synchronize ViewModel and Model in MVVM (CommunityToolkit.Mvvm)
C#CC# / help
11mo ago
❔ Best way to structure MVVM WPF App for multiples popups
C#CC# / help
3y ago
How to access Assembly Reference of all projects in a solution.
C#CC# / help
3y ago
❔ How to publish multiple projects under one solution?
C#CC# / help
4y ago