Skip to content

Conversation

@tomasjanak
Copy link

Fixes #91862 - if a custom_module is in a directory that is outside of the build directory, it is not included as part of the generated .vsproj project after building Godot with SCons.

This is merely adapted fix that was submitted previously as #94099 but never merged. The only part I have changed from the previous submission is between the lines 1169 to 1189 to use the "extensions" arrays rather than a separate for-cycle for each relevant extension; so it is mostly a cosmetic change. I do not know why the original submission was not merged, there is little communication about it, seems the original author simply deleted their repo before it could be integrated. My familiarity with godot build system is minimal, but I am affected by the issue and would like to see it solved, so I've submitted this and would welcome a thorough review.

It only modifies the generate_vs_project function, so I have tested it only with vsproj=yes, other functionality should not be affected. I have verified that the issue is resolved: opening the generated solution in MS Visual Studio shows the "external" module as any other module, e.g. with structure like:
godot.proj
--- Source Files/Header Files
------ modules
--------- mymodule

JetBrains's Rider seems to ignore the .filters file and does not show the external module it in the module folder, but rather as a completely separate folder:
godot.proj
--- modules
--- misc
--- main
......(other root folders)
--- mymodule

But at least it is now part of the solution, which it was not previously. Technically, it is correct since it is only showing the actual folder structure without the filters, so I don't think this has anything to do with this fix, rather with how Rider does (not) use the filters file (or it needs to be set up somehow and I don't know how).

@tomasjanak tomasjanak requested a review from a team as a code owner November 3, 2025 21:47
@Chaosus Chaosus added this to the 4.6 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom module source files are not included in generated Visual Studio project

2 participants