Difference between an APP and Solution

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.

thanks

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:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Clarion 2.1.0.2447
Project("{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}") = "Dlltutor", "Dlltutor.cwproj", "{7603FDFC-41EF-4DE0-81B7-E28E5CD6ED09}"
EndProject
Project("{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}") = "allfiles", "allfiles.cwproj", "{52A55E51-8DAD-4E40-8F8A-BCA80FFD9083}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{{2150E333-8FDC-42A3-9474-1A3956D46DE8}}"
	ProjectSection(SolutionItems) = postProject
		allfiles.app = allfiles.app
		updates.app = updates.app
		reports.app = reports.app
		Dlltutor.app = Dlltutor.app
	EndProjectSection
EndProject
Project("{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}") = "updates", "updates.cwproj", "{2CAA2702-1B9D-46D4-8F71-CF64D47C99AB}"
EndProject
Project("{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}") = "reports", "reports.cwproj", "{0180B62F-9B65-4081-9923-986E99DC0F66}"
EndProject
1 Like

Not afaik, but even if you did create your own .sln, in my experience the ide will still undo any changes you make manually to that .sln.

I gave up trying to do my own .sln files.

Yes on the New Solution dialog under the SharpDevelop branch is “Empty Solution”:

image

Then in the Solution Explorer you can “Add” and pick Apps or Projects.

image

Or I think the options on the File Menu work the same way:


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.

1 Like