basic-computer-games icon indicating copy to clipboard operation
basic-computer-games copied to clipboard

For C#/VB.NET, keep solution and project file in same directory

Open zspitz opened this issue 4 years ago • 6 comments

Even though Visual Studio by default creates the .sln file in the root directory and creates a .csproj/.vbproj file in a subdirectory with all the project files, I don't think this is really necessary.

For example, Amazing (C#) has only four files without a subdirectory; while Acey Ducey (VB.NET) has the unneeded subfolder.

zspitz avatar Jan 03 '22 13:01 zspitz

Sure! If we can normalize on the simpler method, and it still works with Visual Studio, I'm all for it! Feel free to check in a normalization of all csharp (and vbnet) folders!

coding-horror avatar Jan 03 '22 15:01 coding-horror

@zspitz if you'd like to take this on it would be quite welcome!

coding-horror avatar Jan 09 '22 01:01 coding-horror

OK. I'll work it out, as part of generating a standard template for the C#/VB versions.

zspitz avatar Jan 09 '22 23:01 zspitz

Thanks @zspitz, much appreciated!

journich avatar Jan 12 '22 02:01 journich

I'm rethinking this. When there are multiple projects, then each project should be in a separate folder. There are currently four ports that have multiple projects, for one of two reasons:

Not sure about the second -- unless we're going to create some shared abstraction of output usable by all the programs, I think having it in each one is just added noise. But I think having test projects is certainly a valid reason for multiple projects.

Moving an existing port from a "project-in-same-folder-as-solution" to "project-in-subfolder" requires a bit of work:

  1. opening the solution
  2. removing the project from within the solution
  3. moving the project files into a subfolder -- .csproj/.vbproj and all the code files
  4. reattaching the .csproj/.vbproj file from its new location

This is a strong argument for having the project files in a subfolder from the beginning, especially since this is how Visual Studio constructs projects by default.

zspitz avatar Jan 12 '22 06:01 zspitz

This is implemented via #520.

zspitz avatar Jan 17 '22 13:01 zspitz