onlyutkarsh / ExportImportBuildDefinition

Export and Import your build definitions. Useful for recreating all the build steps, variables, schedules, etc in a different team project/account.
http://bit.ly/exportimportbuild
Other
17 stars 8 forks source link

Export includes references to unused tasks causing issue during import #42

Open FranzKohl opened 5 years ago

FranzKohl commented 5 years ago

Installed product versions

Description

System A has tasks available for build definitions, which are provided by a TFS extension, and are only available on this system (example: "SSIS Build & Deploy").

When exporting a build definition with your TFS extension, the resulting JSON file contains references to such tasks, although these type of tasks are not used within the exported build definition - thus causing the following kind of message during import on System B: "Issues with icon should be resolved before importing. If you continue, you might get an ERROR during import."

Below this, one or more lines mentioning task types not existing are listed - for example: "Task SSIS Deploy & Build 1.0.1151 by ToxicGlobe does not exist."

The strange thing here is, that the tasks are NOT used within the exported definition, so I really don't understand why they are referenced in the JSON file and - naturally - causing an issue on the target system during import.

The good thing: the build-definitions got imported despite the error displayed. The bad thing: users will most likely get confused and calling us (the TFS admins) for help.

Steps to recreate

  1. Have two TFS on-prem systems, where System A has a TFS extension installed and active in the collection where you do an export of a build-definition, and System B does not have this TFS extension installed
  2. Create a simple build-definition in a TFS project on System A
  3. Export the build-definition created in step 2.
  4. Import the build-definition into a TFS project on System B

Current behavior

See above and attached screenshot (with an import error dialog referencing three different tasks, which are not used but referenced inside the imported build-definition). 2018-11-08 13_59_05-all definitions

Expected behavior

Build-Tasks not being used in a build-definition should not be referenced in the exported JSON file. However, if it is necessary to reference them for whatever reason, ensure that they do not cause issues during import if they are not used within the build-definition itself.