C Sharp Monorepo

DDerTev10/19/2022
Hey guys šŸ‘‹

I want to create an Monorepo for my C# Backend and Frontend (Blazor).
Any idea, how can I create such an Monorepo?
DDuke10/19/2022
put both projects in the same folder
DDuke10/19/2022
solution*
DDerTev10/19/2022
Like
my-app/
ā”œā”€ backend/
│  ā”œā”€ ....cs
│  ā”œā”€ backend.csproj
ā”œā”€ frontend/
│  ā”œā”€ ....cs
│  ā”œā”€ frontend.csproj
ā”œā”€ .gitignore

?
DDuke10/19/2022
Yeah
DDuke10/19/2022
1 solution, 2 projects
DDerTev10/19/2022
Wdym by solution?
DDuke10/19/2022
In vs for example, when you create something new, you create a solution and a project
DDuke10/19/2022
A solution can contain many projects
DDerTev10/19/2022
Ah yeah, I use VS Code
DDerTev10/19/2022
So the solution is just the root folder?
DDuke10/19/2022
Wherever your .sln is
DDerTev10/19/2022
For what is the .sln file?
PPobiega10/19/2022
its how you handle multi-project "projects" in .NET
AAngius10/19/2022
MyCoolProject
|— MyCoolProject.sln
|— Backend
|  |— Backend.csproj
|  \— ...
|— Frontend
|  |— Frontend.csproj
|  \— ...
|— Shared
|  |— Shared.csproj
|  \— ...
\— ...
DDerTev10/20/2022
And how can I use the Shared thing there then?
MMasterSubarashii10/20/2022
by giving reference?
DDerTev10/20/2022
How?
MMasterSubarashii10/20/2022
does
using
work in VSCode?
DDuke10/20/2022
of course
MMasterSubarashii10/20/2022
but you gotta reference it okay
DDerTev10/20/2022
Thx
DDerTev10/20/2022
Ahhh, is lib/ for this then?
DDerTev10/20/2022
Or just do create the shared project in the src folder?
Ttebeco10/20/2022
it's written in the legend part
Ttebeco10/20/2022
Image
Ttebeco10/20/2022
things your can't pacakge
Ttebeco10/20/2022
99% of dev never have that
DDerTev10/20/2022
Ah
DDerTev10/20/2022
I just didnt get it
DDerTev10/20/2022
So just src/shared/?
Ttebeco10/21/2022
shared is a random name
just like any project
Ttebeco10/21/2022
all source goes into src
Ttebeco10/21/2022
one folder per project
Ttebeco10/21/2022
the example with Shared was because you spoke about FrontEnd (likely Blazor WASM) and Backend (Likely Api)
Ttebeco10/21/2022
and generally you "Share" DTO
Ttebeco10/21/2022
and putting these Dto in a separated project with 0 logic is generally a thing
DDerTev10/21/2022
šŸ‘