Skip to content

Moving .cs file in editor clobbers .csproj compile includes #45651

Closed
@nobuyukinyuu

Description

Godot version:
3.2.3 stable.mono.official

OS/device including version:
Windows 10 x64

Issue description:
I have a somewhat lazily customized csproj file which includes all files without having to deal with the "fragility" of Godot's handling of includes. To handle adding new .cs files to my project, I've included this line:

  <ItemGroup>
    <Compile Include="**\*.cs" />
  </ItemGroup>

This usually survives changes and upgrades to the project format, however, I noticed that moving a cs file in the editor disregards this customization. The behavior is that it will remove the above snippet and replace it with one including only the moved file. This obviously breaks a lot of things. Not sure if I'm using an unrecommended way to include files in my project, but it's easier than forcing myself to create every new cs file in godot when I'd rather just be lazy and do it in vscode.

Steps to reproduce:

  1. Modify a CSProj file where the compile includes itemGroup contains only the above snippet.
  2. In the Godot editor, try moving one of your scripted cs files, the kind that is already linked to a node in the project, to trigger a refactor.
  3. Check csproj file

Minimal reproduction project:

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions