DacPackageExtensions Class

Provides methods to support manipulation of DacPackage objects. These methods work on an existing DacPackage.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Dac.DacPackageExtensions

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

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class DacPackageExtensions
'Usage
public static class DacPackageExtensions
[ExtensionAttribute]
public ref class DacPackageExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type DacPackageExtensions =  class end
public final class DacPackageExtensions

The DacPackageExtensions type exposes the following members.

Methods

  Name Description
Public methodStatic member BuildPackage(Stream, TSqlModel, PackageMetadata) Creates a package with the specified TSqlModel and saves it to the specified Stream.
Public methodStatic member BuildPackage(String, TSqlModel, PackageMetadata) Creates a package with the specified TSqlModel and saves it to the specified location.
Public methodStatic member BuildPackage(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 methodStatic member BuildPackage(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 methodStatic member UpdateModel Updates the model in a DacPackage, replacing the current model with a new one. Before updating, the model will be validated and if errors are encountered a DacServicesException will be thrown. If callers wish to block on warnings as well as errors, they must validate the model by calling Validate() and checking if any errors or warnings are included in the messages returned. Note: only the model is replaced - all other artifacts such as refactor log, pre-deployment script, post-deployment script and and contributor artifacts are not altered. If any of these artifacts rely on elements that are no longer in the updated model then deployment may fail. It is the responsibility of the caller to ensure that these artifacts are consistent with the new model. The Package API can be used to update other artifacts such as the refactor log and scripts and keep them consistent with the updated model. These artifacts are stored as package parts and are identified by their URI. Package parts can be examined using GetParts(). Please refer to the Package API for further information about updating package parts.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Dac Namespace