DacPackageExtensions.BuildPackage Method

 

Updated: April 20, 2017

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

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticBuildPackage(Stream, TSqlModel, PackageMetadata)

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

System_CAPS_pubmethodSystem_CAPS_staticBuildPackage(Stream, TSqlModel, PackageMetadata, PackageOptions)

Creates a package with the specified TSqlModel and saves it to the specified Stream. In addition to the TSqlModel, other artifacts such as refactor log and deployment contributors can be specified in packageOptions.

System_CAPS_pubmethodSystem_CAPS_staticBuildPackage(String, TSqlModel, PackageMetadata)

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

System_CAPS_pubmethodSystem_CAPS_staticBuildPackage(String, TSqlModel, PackageMetadata, PackageOptions)

Creates a package with the specified TSqlModel and saves it to the specified location. In addition to the TSqlModel, other artifacts such as refactor log and deployment contributors can be specified in packageOptions.

Return to top

DacPackageExtensions.BuildPackage Method (Stream, TSqlModel, PackageMetadata)

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

Public Shared Sub BuildPackage (
	stream As Stream,
	model As TSqlModel,
	packageMetadata As PackageMetadata
)

Parameters

stream
Type: System.IO.Stream

The Stream to which the package content will be serialized.

model
Type: Microsoft.SqlServer.Dac.Model.TSqlModel

The TSqlModel representing the model to save into the package.

packageMetadata
Type: Microsoft.SqlServer.Dac.PackageMetadata

The metadata information that describes the package.

Exception Condition
DacServicesException

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

ArgumentNullException

If the stream or model parameters are null.

Return to top

DacPackageExtensions.BuildPackage Method (Stream, TSqlModel, PackageMetadata, PackageOptions)

Creates a package with the specified TSqlModel and saves it to the specified Stream. In addition to the TSqlModel, other artifacts such as refactor log and deployment contributors can be specified in packageOptions.

Public Shared Sub BuildPackage (
	stream As Stream,
	model As TSqlModel,
	packageMetadata As PackageMetadata,
	packageOptions As PackageOptions
)

Parameters

stream
Type: System.IO.Stream

The Stream to which the package content will be serialized.

model
Type: Microsoft.SqlServer.Dac.Model.TSqlModel

The TSqlModel representing the model to save into the package.

packageMetadata
Type: Microsoft.SqlServer.Dac.PackageMetadata

The metadata information that describes the package.

packageOptions
Type: Microsoft.SqlServer.Dac.PackageOptions

The PackageOptions defining advanced options and additional artifacts.

Exception Condition
DacServicesException

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

ArgumentNullException

If the stream or model parameters are null.

Return to top

DacPackageExtensions.BuildPackage Method (String, TSqlModel, PackageMetadata)

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

Public Shared Sub BuildPackage (
	packageFilePath As String,
	model As TSqlModel,
	packageMetadata As PackageMetadata
)

Parameters

packageFilePath
Type: System.String

The path to the package file.

model
Type: Microsoft.SqlServer.Dac.Model.TSqlModel

The TSqlModel representing the model to save into the package.

packageMetadata
Type: Microsoft.SqlServer.Dac.PackageMetadata

The metadata information that describes the package.

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.

Return to top

DacPackageExtensions.BuildPackage Method (String, TSqlModel, PackageMetadata, PackageOptions)

Creates a package with the specified TSqlModel and saves it to the specified location. In addition to the TSqlModel, other artifacts such as refactor log and deployment contributors can be specified in packageOptions.

Public Shared Sub BuildPackage (
	packageFilePath As String,
	model As TSqlModel,
	packageMetadata As PackageMetadata,
	packageOptions As PackageOptions
)

Parameters

packageFilePath
Type: System.String

The path to the package file.

model
Type: Microsoft.SqlServer.Dac.Model.TSqlModel

The TSqlModel representing the model to save into the package.

packageMetadata
Type: Microsoft.SqlServer.Dac.PackageMetadata

The metadata information that describes the package.

packageOptions
Type: Microsoft.SqlServer.Dac.PackageOptions

The PackageOptions defining advanced options and additional artifacts.

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.

Return to top

Community Additions

ADD
Show: