C
C#•3y ago
Tim

C Sharp Monorepo

Hey guys šŸ‘‹ I want to create an Monorepo for my C# Backend and Frontend (Blazor). Any idea, how can I create such an Monorepo?
23 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
Like
my-app/
ā”œā”€ backend/
│ ā”œā”€ ....cs
│ ā”œā”€ backend.csproj
ā”œā”€ frontend/
│ ā”œā”€ ....cs
│ ā”œā”€ frontend.csproj
ā”œā”€ .gitignore
my-app/
ā”œā”€ backend/
│ ā”œā”€ ....cs
│ ā”œā”€ backend.csproj
ā”œā”€ frontend/
│ ā”œā”€ ....cs
│ ā”œā”€ frontend.csproj
ā”œā”€ .gitignore
?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
Wdym by solution?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
Ah yeah, I use VS Code So the solution is just the root folder?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
For what is the .sln file?
Pobiega
Pobiega•3y ago
its how you handle multi-project "projects" in .NET
Angius
Angius•3y ago
MyCoolProject
|— MyCoolProject.sln
|— Backend
| |— Backend.csproj
| \— ...
|— Frontend
| |— Frontend.csproj
| \— ...
|— Shared
| |— Shared.csproj
| \— ...
\— ...
MyCoolProject
|— MyCoolProject.sln
|— Backend
| |— Backend.csproj
| \— ...
|— Frontend
| |— Frontend.csproj
| \— ...
|— Shared
| |— Shared.csproj
| \— ...
\— ...
Tim
TimOP•3y ago
And how can I use the Shared thing there then?
MasterSubarashii
MasterSubarashii•3y ago
by giving reference?
Tim
TimOP•3y ago
How?
Angius
Angius•3y ago
dotnet add reference command - .NET CLI
The dotnet add reference command provides a convenient option to add project to project references.
MasterSubarashii
MasterSubarashii•3y ago
does
using
using
work in VSCode?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
MasterSubarashii
MasterSubarashii•3y ago
but you gotta reference it okay
Tim
TimOP•3y ago
Thx Ahhh, is lib/ for this then? (https://gist.github.com/davidfowl/ed7564297c61fe9ab814) Or just do create the shared project in the src folder?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
Ah I just didnt get it So just src/shared/?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tim
TimOP•3y ago
šŸ‘

Did you find this page helpful?