Setting link priority for traditional Synergy in Visual Studio

You can control the link order for referenced items for a traditional Synergy program by setting priority levels for these items. The higher the setting, the closer the library will be to the end of the link command generated behind the scenes for a build—i.e., the higher the priority. (The default is 0.) If a project has a reference to two libraries that have definitions for entities with the same name, the definition in the library with the higher priority setting will be used.

For example, you could use this feature to patch or replace an ELB by including an ELB that contains only stub routines in your build, giving this ELB the highest priority level, and then later distributing an ELB with the same name, but with implemented routines.

To set the priority for a referenced item, open the .synproj file for your project and add the following (where n is a negative or positive number) to the <reference> tag for the item:


For example, the following gives higher priority to MYDBO.DBO, so if both have a definition with the same name, the definition in MYDBO.DBO will be used:

<reference include="C:\mydir\MYDBO.DBO">
<projectreference include="..\somedir\someproj.synproj">