C
C#2mo ago
Tom

✅ Folder Structure

Let's say I want to create ASP.NET Core app and publish it on GitHub. I think it would be wise to create two parts: 1) the app itself, 2) tests (let's say it would be xunit). What folder structure you would propose in such a case?
5 Replies
Angius
Angius2mo ago
Main project and test project, both under the same solution
MyCoolApp
|— MyCoolApp
| |— MyCoolApp.csproj
| \— Program.cs
|— MyCoolApp.Tests
| |— MyCoolApp.Tests.csproj
| \— SomeTest.cs
\— MyCoolApp.sln
MyCoolApp
|— MyCoolApp
| |— MyCoolApp.csproj
| \— Program.cs
|— MyCoolApp.Tests
| |— MyCoolApp.Tests.csproj
| \— SomeTest.cs
\— MyCoolApp.sln
Tom
TomOP2mo ago
I also thought about creating "src" folder to separate "logic", models, etc. from bin and obj folders which I don't need to publish. Do you think it's a good idea or are there any other common solution for that?
Angius
Angius2mo ago
I usually don't do that, but sure, you absolutely can I've seen plenty people do it this way
Tom
TomOP2mo ago
thanks for your input 🙂
TizzyT
TizzyT2mo ago
Thats what I do. I have a sln, and then under it I have the app/lib/etc and the test app. I only have it all in one project if im working in python for instance. I have the project folder and inside I have a config, src, test I think this approach leaves much to be desired tho?
Want results from more Discord servers?
Add your server