Import MSBuild Task

Official Content
This documentation is valid for:

Imports an import file into the currently opened Knowledge Base.


<Import File="$(ImportFileName)" AutomaticBackup="$(AutomaticBackup)" ImportType="$(ImportType)"
LanguageTranslations="$(LanguageTranslations)" RedefineExternalPrograms="$(RedefineExternalPrograms)"
ImportKBInformation="$(ImportKBInformation)" IncludeItems="$(IncludeItems)" ExcludeItems="$(ExcludeItems)"
PreviewMode="$(PreviewMode)" UpdateFile="$(CompleteXpzPath)"  >
    <Output TaskParameter="ImportedItems" ItemName="ImportedItem" />


File is the fully or partially qualified name of an Import File (.XPZ). REQUIRED

AutomaticBackup: defines whether an automatic backup is generated.

ImportType: Available options are: AllObjects, DifferentObject and NewerObjects.

LanguageTranslations: Available options are: Update, Keep, ReplaceAll.

RedefineExternalPrograms: check the Redefine External Programs Property property.

ImportKBInformation (1): defined wether KB/Version/Environment properties are imported. Possible values are "false" and "true", default value is true.

IncludeItems: List of objects to be imported from the xpz file.

ExcludeItems: List of objects to be excluded from the import process.

PreviewMode : Do not actually import objects; it is useful to get the list of possible imported items.

UpdateFile : Full path where the update file will be saved.

TableIndexesImportBehavior: defined the behavior for tables

  • "Overwrite": completely overwrites user defined Indexes with the provided values.
  • "IncrementalIntegration": merges existing Indexes with the provided values.
  • "ImportDefaultContent": Only import the system defined Indexes with the provided values.
  • "OverwriteEvenDefaultContent": completely overwrites both user and system defined Indexes with the provided values.


ImportedItems (1): Returns a collection with the list of imported objects.


Import file c:\MyExports\ImportTestFile.xpz into the currently opened Knowledge Base.

<Import File="c:\MyExports\ImportTestFile.xpz" />


Object List

The object list for the IncludeItems, ExcludeItems and ImportedItems parameters use the syntax detailed here.


If MSbuild.exe is executed with /verbosity:detailed each object imported will be shown:

Importing Attribute 'ClientAddress'...
Importing Attribute 'ClientBalance'...
Importing Transaction 'Client'...
Importing Procedure 'IsAuthorized'...

1 - The property is deprecated since GeneXus 15 Upgrade 7; use IncludeItems or ExcludeItems options.

See Also

GeneXus MSBuild Taks