Click or drag to resize

How To duplicate applications

This topic explains how to duplicate Packflow applications, allowing concurrent installation on the same Packflow Site.

Introduction - Why not copy-paste ?

Packflow applications are, in first place, defined with a model file. This file contains an xml representation of every modeled object.

All these objects have Guids that must stay unique along a site instance, allowing to associate runtime objects with their modeling counterparts. Hence, duplicating an application can't be done by duplicating the model file or project.

These Guids, as some other properties, have to be made unique. Packflow Designer provides tools to duplicate applications easily while keeping model unicity.

Duplicating an application with Packflow Designer
  1. Open the model you want to duplicate.
  2. On the main node, go to 'model' tab and click 'Duplicate Application'.
  3. A popup appears. Do the following:
    • Select an empty target folder.
    • Choose a new application name that differs from source name.
    • Check the applicable options. (See below for details).
  4. Click 'Duplicate'.
  5. If 'Generate application' was checked, a project generation screen will popup. Choose target folder and click 'generate' as usually. You will be prompted to generate a new .csproj file. Click yes.
  6. Your duplicate application will appear in the model explorer treeview.
App Duplication 1
Configuration details

Different duplication options allow to choose gradually between a simple model duplication and a full project copy with custom codes importation. When no option is checked, Designer will copy and make unique the model file only. Code customizations are not kept.

These options are available:

  • Generate application

    When checked, Designer will prompt to generate a new project from copied model, with all generated codes. File structure from source project is copied beforehand, excepted .csproj, crproj, and .custom.cs files.

    Note Note
    Since .csproj file is not kept, additional files and references not generated by Designer need to be included in project again. They are however present in the new project folder.
  • Import custom codes.

    When checked, Designer will also copy all .custom.cs files in the source project to the duplicate project, while doing a namespace replacement to match the new project's namespace.

    Caution note Caution

    Only files ending by .custom.cs are handled now. Other files you could have added need their namespaces adjusted. Custom aspx, svc files are not handled yet.

    You may automate namespace renaming by ending non-generated C# files names with .custom.cs. This will make Designer process them.