Export-DevartDatabaseProject

Last modified: March 28, 2025

Synopsis

Exports DatabaseProject to a NuGet or Zip package.

Description

Use the cmdlet to export the DatabaseProject object produced by the Invoke-DevartDatabaseBuild and Set-DevartPackageInfo cmdlets as a NuGet package or a .zip file.

Syntax

Export-DevartDatabaseProject -OutputDirectory <string> -Project <DatabaseProject> [-Format {NuGet | Zip}]  [-Overwrite <SwitchParameter>] [<CommonParameters>]

Parameters

-Project <DatabaseProject>

DatabaseProject object to be exported.

Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

-OutputDirectory <string>

Path to the folder to which DatabaseProject is exported. If the folder doesn’t exist, it will be created during the import of DatabaseProject.

Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

Overwrite <SwitchParameter>

Use this parameter to overwrite any existing build artifact with the same name.

Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false

-Format <ExportProjectFormat>

Output format of DatabaseProject. If you don’t use this parameter, DatabaseProject will be exported to a NuGet package by default.

Possible values: NuGet, Zip

Required? false

Position? named

Default value NuGet

Accept pipeline input? false

Accept wildcard characters? false

<CommonParameters>

This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, InformationAction, InformationVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

Outputs

System.Boolean (returns true on success and false otherwise)

Examples

---------- EXAMPLE 1 ----------
Set-DevartPackageInfo -Project $databaseProject -Id Devart.DbForge.DevOpsAutomation.ScriptFolder -Version 1.0.0
Export-DevartDatabaseProject -Project $databaseProject -OutputDirectory C:\NuGetRepository -Format NuGet