Which folder structure to use? #1
Replies: 3 comments 15 replies
|
I think the multi-folder approach is better because it removes any ambiguity as to what is used where, more or less at a glance. In our projects we have multiple platform-specific files that even share the same name, like Program.cs, ContentMangaer.cs, etc. Not that they necessarily have to, you could just as easily name the files "Xbox_ContentManager.cs" for example and achieve the same goal, but the whole point of folders is to provide structure and organization so you don't have to name files that way. Most our platforms also have other specific stuff like android's keystores, manifest, Resources, etc that just organize much better when specifically in a "GameName.Android" folder and not mixed in with every other platforms' stuff. |
|
This is extremely tough, because I genuinely like both. I think for the project I'm in the process of spinning up right now, I might use a middle ground approach with a tweak, just for the sake of experimentation: With the <ItemGroup>
<Compile Include="Source\**\*.cs" />
<Compile Include="Platform\$(MonoGamePlatform).cs" />
</ItemGroup>It definitely falls apart considering mobile platforms, though. I think (purely for me personally) I would prefer, for the multi-folder approach, to keep the .csproj files in the solution root, and move the platform folders into a For some reason, a bunch of folders visible in the project root feels a lot untidier than a bunch of .csproj files for me. Whereas all of the |


Uh oh!
There was an error while loading. Please reload this page.
Pitch in on the approach to use for the Folder structure for the template. Mainly whether it is worth creating additional folders to host the platform
csprojdefinitions or not.Bear in mind, that unless you are writing platform specific code, you are unlikely to need them. However, it is more akin to MonoGame projects of old.
Make your vote, but also comment below as to your reasons why your choice feels better.
Note
There is no right or wrong answer here, structures like this are more about personal feelings, and the end result is your project will build and run just fine!
2 votes ·
All reactions