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

C#: Allow project source files to be separated into a sub project folder. #28290

Closed
exts opened this issue Apr 22, 2019 · 1 comment
Closed

Comments

@exts
Copy link
Contributor

exts commented Apr 22, 2019

Godot version:
3.2

OS/device including version:
All

Issue description:
Currently all C# projects are forced to be in the root project folder meaning the default namespace will always be that folder and most code is put into sub folders. When that happens your src, code, project, scripts, etc... subfolder where you store your scripts and other source code now is forced to be added into the namespace path eg.: ProjectName.Scripts which ideally despite scripts not needing namespaces, you would want your scripts on the root namespace which is just ProjectName.

I was messing around with jetbrains console project and realized there's a feature that allows you to set this in the sln file. For instance:

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication6", "ConsoleApplication6\ConsoleApplication6.csproj", "{D7E527AF-F5E5-45A0-AAE6-B4C46ED0347D}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {D7E527AF-F5E5-45A0-AAE6-B4C46ED0347D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {D7E527AF-F5E5-45A0-AAE6-B4C46ED0347D}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {D7E527AF-F5E5-45A0-AAE6-B4C46ED0347D}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {D7E527AF-F5E5-45A0-AAE6-B4C46ED0347D}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
EndGlobal

Now you could try manually editing this to your project sln, but building in editor complains if you move the .mono, .csproj to the sub folder.

Suggestion:
Allow c# projects to have a sub folder inside the project folder with the same name be the root of our project. This would make separating the c# much cleaner and organize the code base better.

Just a simple checkbox asking if the project source be in a subfolder ProjectName\ProjectName and when enabled the editor will look in that folder for the source as the root rather than the root project folder.

@mhilbrunner
Copy link
Member

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants