Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zspitz opened this issue Jan 3, 2022 · 6 comments
Closed

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

zspitz opened this issue Jan 3, 2022 · 6 comments

Comments

@zspitz
Copy link
Contributor

zspitz commented Jan 3, 2022

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.

@coding-horror
Copy link
Owner

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
Copy link
Owner

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

@zspitz
Copy link
Contributor Author

zspitz commented Jan 9, 2022

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

@journich
Copy link
Contributor

Thanks @zspitz, much appreciated!

@zspitz
Copy link
Contributor Author

zspitz commented Jan 12, 2022

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
Copy link
Contributor Author

zspitz commented Jan 17, 2022

This is implemented via #520.

coding-horror added a commit that referenced this issue Jan 17, 2022
Simplify project structure in line with #381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants