Package.Configurations Property

Returns the collection of configurations for the package. A package can have more than one configuration associated with it. This property is read-only.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

public Configurations Configurations { get; }
/** @property */
public Configurations get_Configurations ()

public function get Configurations () : Configurations

Property Value

A Configurations collection.

Each configuration allows you to set a package variable from an external source, such as from a configuration file, environment variable, or registry entry. For more information about package configuration, see Creating Package Configurations.

The following example loads a sample package, and then returns a count of the number of configurations associated with the package.

class PackageTest
        static void Main(string[] args)
            // The variable pkg points to the location of the
            // ExecuteProcess package sample installed with the
            // samples.
            string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";

            Application app = new Application();
            Package p = app.LoadPackage(pkg, null);

            int n = p.Configurations.Count;
            Console.WriteLine("Number of configurations = " + n);

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

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions