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
šŸ‘
Want results from more Discord servers?
Add your server