SQL Change Automation 4

New-DatabaseProjectObject

Creates an IProject from a path.

Syntax

New-DatabaseProjectObject [-InputObject] <string> [<CommonParameters>]

Description

The New-DatabaseProjectObject cmdlet takes a path and creates an IProject object that represents the project.

The cmdlet assumes you have built the project by other means and does not attempt to perform its own build.

Parameters

-InputObject <System.String>

The path to the database project.

Aliases None
Required? true
Position? 0
Default Value None
Accept Pipeline Input true (ByValue)
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String

    The path to the database project.

Return values

The output type is the type of the objects that the cmdlet emits.

  • RedGate.Versioning.Automation.Compare.Domain.Projects.IProject

Examples

---------- EXAMPLE 1 ----------

$projectPath = "C:\Work\scripts"
$project = $projectPath | New-DatabaseProjectObject

This example shows how to use the New-DatabaseProjectObject cmdlet to obtain an IProject from a SQL Source Control Project which can be used to create a build artifact.

It is recommended to use Invoke-DatabaseBuild instead if you are able to - this cmdlet does not guarantee your project is actually valid, and your process may fail unexpectedly later if it is not. Please only use this cmdlet if you are certain that the changes you have made are applicable. This cmdlet will output an instance of a IProject object that can be used as the input for other SQL Change Automation cmdlets.

---------- EXAMPLE 2 ----------

$projectPath = "C:\Work\project\project.sqlproj"
$project = $projectPath | New-DatabaseProjectObject

This example shows how to use the New-DatabaseProjectObject cmdlet to obtain an IProject from a SQL Change Automation Project which can be used to create a build artifact.

It is recommended to use Invoke-DatabaseBuild instead if you are able to - this cmdlet does not guarantee your project is actually valid, and your process may fail unexpectedly later if it is not. Please only use this cmdlet if you are certain that the changes you have made are applicable. This cmdlet will output an instance of a IProject object that can be used as the input for other SQL Change Automation cmdlets.


Didn't find what you were looking for?