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
- packageFilePath
Type: System.String
Path to the package file.
- model
Type: Microsoft.SqlServer.Dac.Model.TSqlModel
TSqlModel representing the model to save into the package.
- packageMetadata
Type: Microsoft.SqlServer.Dac.PackageMetadata
Metadata information that describes the package.
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. |