I’ve been using Clarion since the early days, but I don’t think I ever got a good grip on the difference between an app and solution. For instance, if I have a bunch of apps which use the same DCT that create DLLs and EXEs. my understanding is that I would want to create a new Solution and then add all these apps to it. However, when I create a new solution, it also creates an APP of that same name, which I don’t want or need. Can I create a “blank” solution? Or am I understanding this relationship incorrectly?
Also, each app also has a project file. So when I add other existing applications to a solution, do I add “existing application” or do I add “existing project”? What’s the difference? And even more confusing, I can right-click in the Solution Explorer and select Add New Item anywhere in the Solution tree – does it make a difference where in the tree I right-click and Add? Also, when I get to the file selector, one of the file types is shows are .sln files. So you can add a solution to a solution? That muddies it even more for me.
A Solution is a rather simple XML container to link to 1 or more Projects (CwProj).
You can open it in Notepad and see it just points at CwProj files.
An APP is a Clarion thing which the MS CwProj points to as well as generated CLWs.
A CwProj can also just have CLW files with no APP.
Via the Cwproj an APP can be linked from multiple Solutions. E.g. a Solution with just One Project (APP) and a System Solution that links to multiple related APPs (via CwProj).
You could look at the DLL Tutor as an example SLN file, pasted below:
I would add the CwProj because with that all the Project settings come. Those Project settings are mostly duplicated in the APP, but its not always synchronized perfectly in the system. The new IDE uses the MsBuild system to compile and link which uses the CwProj for everything not the APP.
That said, I think of you pick the .APP the IDE spots there is a matching named .CwProj and uses that. The IDE would have to do that, or overwrite the CwProj. You could keep a copy of the CwProj and compare to be sure it was not changed.
One other tip:
If you need to restore an APP from backup always take CwProj file also. If you have an AppName.SLN file for that 1 CwProj/App, then also take that (but its not as important).
So it follows if you are going to backup your work be sure to save the APP and CwProj, plus SLN.
If you have multiple CwProj’s in the SLN then it becomes more important keep that backed up, and restored with the other files because it will contain some build settings for the order of the APPs.