Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Make an independent copy of the shared file for each referencing project. This is the default, but it is typically only used in the initial iterations of an upgrade solution.

  2. Compile a single copy of the shared file into one of the existing projects or into a custom 'host' project and reference the shared file content through the host assembly.  This is done using the "SharedFile" statement described here https://portal.greatmigrations.com/display/GMG/gmplSharedFileStatement

  3. Put a single copy of the shared file in a specified location in the source directory and reference the shared file content through a link to the shared file. This can be achieved fairly easily with a few translation script commands; however additional work is also needed to set a namespace for the linked file and then use that namespace in references to the contents of the file.

How To: Shared Files Consolidation

I have a set of VBPs that share code files; that is, many VBPs reference the same code files. In default gmStudio Translations, the resulting .NET projects each gets separate copies of the shared files they reference. This file copying simplifies the translation, but it has some disadvantages in terms of version control, builds, and deployments. An alternative structure is to put the shared files into one of more "host" assemblies and have the translated application projects reference the shared files through the host assembly. Migrating to this assembly-based code sharing model is the approach described here.

...