You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Delphi 10.4.2 IDE项目文件排序顺序频繁丢失:如何解决?是否存在IDE bug?

Delphi 10.4.2 Project File Sort Order Loss: Fixes & Bug Confirmation

Hey there, I’ve wrestled with this exact annoyance in Delphi 10.4.2 before, so let’s cut to the chase with clear answers and fixes.

Is this a Delphi 10.4.2 bug?

Absolutely—this is a known issue in 10.4.2 (and some earlier 10.4.x versions). Embarcadero acknowledged it in their quality feedback system, and it boils down to how the IDE saves project file (.dproj) entries. When you set a custom sort order in the Project Manager, the IDE often fails to write that order correctly to the .dproj XML. Reopening the project then reverts files to a default order (usually alphabetical or the order they were first added).

Effective fixes to retain sort order

Here are the workarounds I’ve tested and seen work for other developers:

  • Manual .dproj editing (quick, reliable fix)
    First, close the Delphi IDE entirely. Open your project’s .dproj file in a text editor (Notepad++ or VS Code work great). Look for <ItemGroup> sections containing your source files—they’ll look like <DelphiCompile Include="Unit1.pas" />. Rearrange these entries into your desired order, save the file, then reopen the project in Delphi. Always back up the .dproj first to avoid breaking your project.

  • Use a Project Group
    If you’re working with multiple projects, wrap them in a .groupproj (Project Group). Many users report that sort order stays consistent better when managing projects through a group, as the group file handles persistence more reliably than individual .dproj files.

  • Avoid bulk file additions
    Adding multiple files at once almost always resets the sort order. If you need a specific sequence, add files one by one, or sort immediately after adding, then close and reopen the project to lock in the order.

  • Apply cumulative patches
    Check Embarcadero’s official update page for Delphi 10.4.2. While there’s no standalone patch for this exact issue, cumulative updates (like Update 1) include fixes for project file persistence that can reduce how often the sort order resets.

  • Stick to Alpha Sort (if custom order isn’t critical)
    Right-click your project in the Project Manager > View > Alpha Sort. This locks files into alphabetical order, which the IDE maintains consistently—no more random reverts if you don’t need a custom sequence.

If you can swing it, upgrading to a newer Delphi version (like 11 Alexandria or later) is the long-term fix—this sort order persistence bug was mostly resolved in subsequent releases.

内容的提问来源于stack exchange,提问作者Jan Doggen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 20:32:43