DevPartner 2018 Workshop : Maximize Your Traditional Synergy Development with Visual Studio

Exercise 4: Mainline Program Projects

Previous Exercise Home Next Exercise

This is the fourth of a series of exercises that demonstrate the abilities of developing Traditional Synergy inside Visual Studio.

If you have not completed the previous exercises you can find the first one here.

This exercise will create a Traditional Synergy mainline project and add source files to it. From this you will link to the existing libraries to build the mainline executables. Throughout the exercise you will make changes to elements of the Visual Studio solution and see the powerful MSBUILD sub-system in action.

To begin the exercise, follow these simple steps:

This will create a multiple mainline project. After the project is created it will open up the Program1.dbl and Program2.dbl files. Close these windows. We can also delete the default source file from the project:

To ensure the correct version of the software is built:

We are going to add a single source files to the project. This source file can be downloaded from here. Download (when prompted by the browser select “open”) and open the zip file and copy the source file to the OnVinylTKMaint project folder you have just created. This folder will be under the DevPartner2018 solution folder.

To add the source file to the project follow these steps:

This will add the source files to the project. To ensure we are going to build the project correctly, on the menu bar ensure that the Solution Configuration is set the Debug and the Solution Platform is set the x64.

Now we can try to execute the build process:

Several linker errors, which is to be expected!

Out first task is to define where our application routines exist. We need to define a reference between our Mainline Project and our Executable Library project. To define the project reference:

Now we can try to execute the build process:

The program fails to build because the library name is too long. We need to address this issue:

Now we can try to execute the build process:

Now we can try to execute the target program. To do this we need to tell visual studio what we want to run:

From the Debug menu, select the Start Debugging entry to run the program.

The solution should correctly build and the program execute. Does not look great! Selecting an item from the list displays the input form, but no prompt information and there will be no field validation. Close the Vinyl Maintenance program.

We should first define the project dependencies

The next task is to define additional attributes in the repository schema file. We are going to edit the schema file directly and once completed the repository project will automatically build.

Now we can try to execute the build process and run the target executable:

Selecting an item from the list now and the input form displays prompt information and the field validation defined in the repository is now enabled in the form.

The UI is still not complete as the list and input forms don’t have titles.

Now we can try to execute the build process and run the target executable:

The collection list now has a title. Selecting an item from the list and the input form has a title. The window library was built as part of the request to run the target program.

If you want to compare results, you can review the finished product here.