Clarion build
12.0.14204
OS / architecture
Windows 11 25H2
Area
IDE / editor
What happened
When a project is added to a .sln from outside the IDE while the solution is open,
the IDE detects the change and offers to reload, but answering Yes both fails to
show the project and overwrites the .sln on disk with the IDE’s in-memory copy, so
the external change is lost.
The dialog appears exactly as expected:
Solution changed externally
The solution or one of its project files has been changed outside the IDE.
Reload the solution to pick up the changes?
[Yes] [No]
Answering Yes:
- the new project does not appear in the Solution Explorer tree
- the .sln on disk is rewritten back to its previous contents, byte-identical to a
copy taken before the edit, with a modified timestamp a few seconds after Yes was
clicked
No error message is shown - the change is discarded silently. Reproduced twice,
answering Yes both times. The new project’s own folder, .cwproj and .clw were left
untouched on disk; only the .sln was reverted. The .sln.cache file was not written
at any point during the tests.
The equivalent project-level case works correctly. Adding a
entry to an already-loaded .cwproj externally produces the
same prompt, and answering Yes shows the new file in the tree straight away, with
the .cwproj left untouched on disk (same size and timestamp as the external write),
so the IDE re-read it rather than rewriting it. The fault appears to be specific to
solution-level structure.
This looks like the reload re-reads the projects it already knows about and then
re-serialises the .sln from the stale in-memory project list, so a project that
exists only on disk is neither picked up nor preserved. It may also mean the
save-time staleness check covers .cwproj but not .sln.
Worth noting the practical trigger is not hand-editing a .sln, but a git pull,
branch switch or merge that adds a project while the solution is open: the IDE
asks, you answer Yes, and the incoming change is reverted without warning.
Steps to reproduce
-
Open a solution containing a single Clarion project and leave the IDE open.
-
Outside the IDE, create a second project - a folder containing a minimal
.cwproj (own ProjectGuid) and one .clw source file. -
Outside the IDE, edit the .sln in a text editor to add the second project:
a Project(“{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}”) = “HelloWorld”,
“HelloWorld\HelloWorld.cwproj”, “{new-guid}” block with its EndProject, plus the
four matching lines in GlobalSection(ProjectConfigurationPlatforms). Save it.
(Take a copy of the .sln first - it is needed for step 6.) -
Switch focus back to the IDE. The “Solution changed externally” dialog appears.
-
Click Yes. Observe that the Solution Explorer tree still shows only the original
project - the new one is not listed. -
Compare the .sln on disk with the copy taken in step 3. It has been rewritten
back to its original single-project contents, and its timestamp is later than
the external edit.
For contrast, the working case: add to the
already-loaded project’s .cwproj externally, create that .clw alongside it, switch
back to the IDE and answer Yes to the same dialog. The file appears in the tree and
the .cwproj on disk is not modified.