Share via


DacPackageExtensions.BuildPackage Method (String, TSqlModel, PackageMetadata)

Creates a package with the specified TSqlModel and saves it to the specified location.

Namespace:  Microsoft.SqlServer.Dac
Assembly:  Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)

Syntax

'Declaration
Public Shared Sub BuildPackage ( _
    packageFilePath As String, _
    model As TSqlModel, _
    packageMetadata As PackageMetadata _
)
'Usage
Dim packageFilePath As String 
Dim model As TSqlModel 
Dim packageMetadata As PackageMetadata 

DacPackageExtensions.BuildPackage(packageFilePath, _
    model, packageMetadata)
public static void BuildPackage(
    string packageFilePath,
    TSqlModel model,
    PackageMetadata packageMetadata
)
public:
static void BuildPackage(
    String^ packageFilePath, 
    TSqlModel^ model, 
    PackageMetadata^ packageMetadata
)
static member BuildPackage : 
        packageFilePath:string * 
        model:TSqlModel * 
        packageMetadata:PackageMetadata -> unit
public static function BuildPackage(
    packageFilePath : String, 
    model : TSqlModel, 
    packageMetadata : PackageMetadata
)

Parameters

Exceptions

Exception Condition
DacServicesException

If there are any errors during package serialization, including errors validating the model.

ArgumentNullException

If the packageFilePath or model parameters are null.

See Also

Reference

DacPackageExtensions Class

BuildPackage Overload

Microsoft.SqlServer.Dac Namespace