Skip to content

[4.5 Stable mono] When generating .csproj and .sln files for C#, Godot does not respect .gdignore #114614

@recatek

Description

@recatek

Tested versions

v4.5.1.stable.mono.official

System information

Godot v4.5.1.stable.mono - Windows 11 (build 26100) - Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 32.0.15.8180) - 13th Gen Intel(R) Core(TM) i7-13700K (24 threads) - 63.77 GiB memory

Issue description

Godot will include .cs files from directories marked with a .gdignore file in the root .csproj/.sln

Steps to reproduce

  • Create an empty Godot project
  • Add a C# script in the project root
  • Add C# scripts to a subdirectory
  • Add a .gdignore to that subdirectory
  • Delete the .csproj and .sln files in the Godot project root
  • Build (in Godot)
  • Open the C# project root script
  • Observe that C# scripts from the .gdignore'd directory are included in the solution

Minimal reproduction project (MRP)

exclude-cs.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions