Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added psake build script and nuspec file.

  • Loading branch information...
commit 46530870d5dc1b6d68635642b43ab6886305d6f8 1 parent 0272f4d
@craiggwilson authored
View
5 .gitignore
@@ -10,4 +10,7 @@ TestResults
packages
# NCrunch
-*.ncrunch*
+*.ncrunch*
+
+#other
+artifacts
View
31 MongoDB.OData.nuspec
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <id>MongoDB.OData</id>
+ <title>MongoDB.OData</title>
+ <version>0.0.0</version>
+ <authors>Craig Wilson</authors>
+ <owners>Craig Wilson</owners>
+ <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
+ <projectUrl>https://github.com/craiggwilson/mongo-dotnet-odata</projectUrl>
+ <iconUrl>http://jobs.mongodb.org/files/logos/889002/889002.png</iconUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>"OData provider backed by MongoDB"</description>
+ <tags>mongodb mongo odata wcf</tags>
+ <dependencies>
+ <dependency id="FluentAssertions"/>
+ <dependency id="Microsoft.Data.Edm"/>
+ <dependency id="Microsoft.Data.OData"/>
+ <dependency id="Microsoft.Data.Services"/>
+ <dependency id="Microsoft.Data.Services.Client"/>
+ <dependency id="mongocsharpdriver"/>
+ <dependency id="NUnit"/>
+ <dependency id="System.Spatial"/>
+ </dependencies>
+ </metadata>
+ <files>
+ <file src="artifacts\build\MongoDB.OData.dll" target="lib\4.0" />
+ <file src="artifacts\build\MongoDB.OData.xml" target="lib\4.0" />
+ <file src="artifacts\build\MongoDB.OData.pdb" target="lib\4.0" />
+ </files>
+</package>
View
6 MongoDB.OData.sln
@@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.OData.IntegrationTe
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.OData.UnitTests", "src\MongoDB.OData.UnitTests\MongoDB.OData.UnitTests.csproj", "{079AA188-5BA0-437F-AAA2-3F4681393A15}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{CA64904B-9F5A-4FA0-9787-ED5D1376E0B8}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,4 +83,8 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {D9B7A239-9F4E-4E55-838D-4766EBEA5672} = {CA64904B-9F5A-4FA0-9787-ED5D1376E0B8}
+ {59DA97A0-8CD9-461C-9EA5-1AE45D34A1A7} = {CA64904B-9F5A-4FA0-9787-ED5D1376E0B8}
+ EndGlobalSection
EndGlobal
View
56 default.ps1
@@ -0,0 +1,56 @@
+Properties {
+ $base_dir = Split-Path $psake.build_script_file
+ $artifacts_dir = "$base_dir\artifacts\"
+ $build_dir = "$artifacts_dir\build\"
+ $package_dir = "$artifacts_dir\packages\"
+ $src_dir = "$base_dir\src\"
+ $tools_dir = "$base_dir\tools\"
+ $nuget_file = "$tools_dir\nuget\nuget.exe"
+ $nunit_file = "$tools_dir\nunit\nunit-console.exe"
+ $sln_file = "$base_dir\MongoDB.OData.sln"
+ $asm_file = "$src_dir\GlobalAssemblyInfo.cs"
+ $nuspec_file = "$base_dir\MongoDB.OData.nuspec"
+
+ $version = "0.1.0.0"
+ $sem_version = "0.1"
+ $config = "Release"
+}
+
+$framework = '4.0'
+
+include .\psake_ext.ps1
+
+Task Default -Depends Build
+
+Task Clean {
+ if (Test-Path $artifacts_dir)
+ {
+ rd $artifacts_dir -rec -force | out-null
+ }
+
+ Write-Host "Cleaning $sln_file" -ForegroundColor Green
+ Exec { msbuild "$sln_file" /t:Clean /p:Configuration=$config /v:quiet }
+}
+
+Task Init -Depends Clean {
+ $infos = gci -rec "**\AssemblyInfo.cs"
+
+ Generate-Assembly-Info `
+ -file $asm_file `
+ -version $version `
+ -sem_version $sem_version `
+ -copyright 'Craig Wilson 2012'
+}
+
+Task Build -Depends Init {
+ mkdir -p $build_dir
+
+ Write-Host "Building $sln_file" -ForegroundColor Green
+ Exec { msbuild "$sln_file" /t:Build /p:Configuration=Release /v:quiet /p:OutDir=$build_dir }
+}
+
+task Package -depends Build {
+ mkdir -p $package_dir
+
+ & $nuget_file pack $nuspec_file -o $package_dir -Version $sem_version -Symbols -BasePath $base_dir
+}
View
11 psake.cmd
@@ -0,0 +1,11 @@
+@echo off
+
+if '%1'=='/?' goto help
+if '%1'=='-help' goto help
+if '%1'=='-h' goto help
+
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\tools\psake\psake.ps1' %*; if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"
+goto :eof
+
+:help
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\tools\psake\psake.ps1' -help"
View
38 psake_ext.ps1
@@ -0,0 +1,38 @@
+function Get-Git-Commit
+{
+ $gitLog = git log --oneline -1
+ return $gitLog.Split(' ')[0]
+}
+
+function Generate-Assembly-Info
+{
+param(
+ [string]$company,
+ [string]$copyright,
+ [string]$version,
+ [string]$sem_version,
+ [string]$file = $(throw "file is a required parameter.")
+)
+ $commit = Get-Git-Commit
+ $asmInfo = "using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyCompanyAttribute(""$company"")]
+[assembly: AssemblyCopyrightAttribute(""$copyright"")]
+[assembly: AssemblyVersionAttribute(""$version"")]
+[assembly: AssemblyInformationalVersionAttribute(""$sem_version / $commit"")]
+[assembly: AssemblyFileVersionAttribute(""$version"")]
+[assembly: AssemblyDelaySignAttribute(false)]
+"
+
+ $dir = [System.IO.Path]::GetDirectoryName($file)
+ if ([System.IO.Directory]::Exists($dir) -eq $false)
+ {
+ Write-Host "Creating directory $dir"
+ [System.IO.Directory]::CreateDirectory($dir)
+ }
+ Write-Host "Generating assembly info file: $file"
+ Write-Output $asmInfo > $file
+}
View
BIN  src/GlobalAssemblyInfo.cs
Binary file not shown
View
3  src/MongoDB.OData.IntegrationTests/MongoDB.OData.IntegrationTests.csproj
@@ -66,6 +66,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
View
29 src/MongoDB.OData.IntegrationTests/Properties/AssemblyInfo.cs
@@ -2,35 +2,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("MongoDB.OData.IntegrationTests")]
[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MongoDB.OData.IntegrationTests")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("db1ce51c-c044-4790-8820-ae9c423ae9c3")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: Guid("db1ce51c-c044-4790-8820-ae9c423ae9c3")]
View
3  src/MongoDB.OData.SampleHost/MongoDB.OData.SampleHost.csproj
@@ -103,6 +103,9 @@
</Content>
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="HumanResourcesApi.svc.cs">
<DependentUpon>HumanResourcesApi.svc</DependentUpon>
</Compile>
View
25 src/MongoDB.OData.SampleHost/Properties/AssemblyInfo.cs
@@ -7,29 +7,6 @@
// associated with an assembly.
[assembly: AssemblyTitle("MongoDB.OData.SampleHost")]
[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MongoDB.OData.SampleHost")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f2c0bdf2-de8b-45fd-9d68-a470266145a1")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: Guid("f2c0bdf2-de8b-45fd-9d68-a470266145a1")]
View
3  src/MongoDB.OData.SampleModels/MongoDB.OData.SampleModels.csproj
@@ -40,6 +40,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="Blog\Blog.cs" />
<Compile Include="Blog\BlogPostSummary.cs" />
<Compile Include="Blog\Comment.cs" />
View
26 src/MongoDB.OData.SampleModels/Properties/AssemblyInfo.cs
@@ -7,30 +7,6 @@
// associated with an assembly.
[assembly: AssemblyTitle("MongoDB.OData.SampleModels")]
[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MongoDB.OData.SampleModels")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("0a7b672b-6114-4105-869e-82766f9f1b37")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: Guid("0a7b672b-6114-4105-869e-82766f9f1b37")]
View
3  src/MongoDB.OData.UnitTests/MongoDB.OData.UnitTests.csproj
@@ -72,6 +72,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="Specification.cs" />
<Compile Include="TypedMetadataBuilderTests\When_mapping_a_hierarchy.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
View
29 src/MongoDB.OData.UnitTests/Properties/AssemblyInfo.cs
@@ -2,35 +2,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("MongoDB.OData.UnitTests")]
[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MongoDB.OData.UnitTests")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("28b9fdaa-8e19-4f8e-867c-d4c837c7976f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: Guid("28b9fdaa-8e19-4f8e-867c-d4c837c7976f")]
View
5 src/MongoDB.OData/MongoDB.OData.csproj
@@ -23,6 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <DocumentationFile>bin\Debug\MongoDB.OData.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -31,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <DocumentationFile>bin\Release\MongoDB.OData.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Data.Edm, Version=5.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -70,6 +72,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="MongoCollectionAttribute.cs" />
<Compile Include="MongoDatabaseAttribute.cs" />
<Compile Include="Typed\TypedDataSource.cs" />
View
31 src/MongoDB.OData/Properties/AssemblyInfo.cs
@@ -2,36 +2,9 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MongoDB.OData")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("MongoDB.OData")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
+[assembly: AssemblyTitle("MongoDB.OData")]
+[assembly: AssemblyDescription("An OData provider backed by MongoDB.")]
[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a277cef1-288b-4348-9062-67986ddd0f41")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("MongoDB.OData.UnitTests")]
View
2,130 tools/psake/en-US/psake.psm1-help.xml
@@ -0,0 +1,2130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<helpItems schema="maml">
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>Invoke-psake</command:name>
+ <maml:description>
+ <maml:para>Runs a psake build script.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb>Invoke</command:verb>
+ <command:noun>psake</command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function runs a psake build script</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Invoke-psake</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>buildFile</maml:name>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>taskList</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>framework</maml:name>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>docs</maml:name>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>parameters</maml:name>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>properties</maml:name>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>nologo</maml:name>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>buildFile</maml:name>
+ <maml:description>
+ <maml:para>The path to the psake build script to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue>'default.ps1'</dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="1">
+ <maml:name>taskList</maml:name>
+ <maml:description>
+ <maml:para>A comma-separated list of task names to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ <dev:type>
+ <maml:name>String[]</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="2">
+ <maml:name>framework</maml:name>
+ <maml:description>
+ <maml:para>The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework. If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64'</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue>'3.5'</dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="3">
+ <maml:name>docs</maml:name>
+ <maml:description>
+ <maml:para>Prints a list of tasks and their descriptions</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="4">
+ <maml:name>parameters</maml:name>
+ <maml:description>
+ <maml:para>A hashtable containing parameters to be passed into the current build script. These parameters will be processed before the 'Properties' function of the script is processed. This means you can access parameters from within the 'Properties' function!
+</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ <dev:type>
+ <maml:name>Hashtable</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="5">
+ <maml:name>properties</maml:name>
+ <maml:description>
+ <maml:para>A hashtable containing properties to be passed into the current build script. These properties will override matching properties that are found in the 'Properties' function of the script.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ <dev:type>
+ <maml:name>Hashtable</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="6">
+ <maml:name>nologo</maml:name>
+ <maml:description>
+ <maml:para>Do not display the startup banner and copyright message.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para>---- Exceptions ----</maml:para>
+ <maml:para>If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false. To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false. Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.</maml:para>
+ <maml:para></maml:para>
+ </maml:alert>
+ <maml:alert>
+ <maml:para>---- $psake variable ----</maml:para>
+ <maml:para>When the psake module is loaded a variable called $psake is created which is a hashtable
+containing some variables:
+
+$psake.version # contains the current version of psake
+$psake.context # holds onto the current state of all variables
+$psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+$psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+$psake.build_success # indicates that the current build was successful
+$psake.build_script_file # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir # contains the fully qualified path to the current build script
+
+You should see the following when you display the contents of the $psake variable right after importing psake
+
+PS projects:\psake> Import-Module .\psake.psm1
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+run_by_psake_build_tester False
+version 4.2
+build_success False
+build_script_file
+build_script_dir
+config_default @{framework=3.5; ...
+context {}
+
+After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+PS projects:\psake> Invoke-psake .\examples\default.ps1
+Executing task: Clean
+Executed Clean!
+Executing task: Compile
+Executed Compile!
+Executing task: Test
+Executed Test!
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0798486
+Compile 00:00:00.0869948
+Test 00:00:00.0958225
+Total: 00:00:00.2712414
+
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+build_script_file YOUR_PATH\examples\default.ps1
+run_by_psake_build_tester False
+build_script_dir YOUR_PATH\examples
+context {}
+version 4.2
+build_success True
+config_default @{framework=3.5; ...
+
+</maml:para>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the 'default' task in the '.build.ps1' build script</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake '.\build.ps1' Tests,Package</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 3 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake Tests</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>This example will run the 'Tests' tasks in the 'default.ps1' build script. The 'default.ps1' is assumed to be in the current directory.</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 4 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake 'Tests, Package'</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>This example will run the 'Tests' and 'Package' tasks in the 'default.ps1' build script. The 'default.ps1' is assumed to be in the current directory.</maml:para>
+ <maml:para>NOTE: The quotes around the list of tasks to execute is required if you want to execute more than 1 task.</maml:para>
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 5 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\build.ps1 -docs</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Prints a report of all the tasks and their dependencies and descriptions and then exits</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 6 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'</maml:para>
+ <maml:para>Here's the .\parameters.ps1 build script:</maml:para>
+ <maml:para />
+ <maml:para>
+ properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+}</maml:para>
+ <maml:para />
+ <maml:para>Notice how you can refer to the parameters that were passed into the script from within the “properties” function. The value of the $p1 variable should be the string “v1” and the value of the $p2 variable should be “v2”.</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 7 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'</maml:para>
+ <maml:para>This feature allows you to over-ride existing properties in your build script.</maml:para>
+ <maml:para />
+ <maml:para>Here's the .\properties.ps1 build script</maml:para>
+ <maml:para>properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+}
+</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>TaskTearDown</command:name>
+ <maml:description>
+ <maml:para>Adds a scriptblock to the build that will be executed after each task</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function will accept a scriptblock that will be executed after each
+task in the build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>TaskTearDown</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>teardown</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>teardown</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>Executing task, Clean...
+Running 'TaskTearDown' for task Clean
+Executing task, Compile...
+Running 'TaskTearDown' for task Compile
+Executing task, Test...
+Running 'TaskTearDown' for task Test
+
+Build Succeeded</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>TaskSetup</command:name>
+ <maml:description>
+ <maml:para>Adds a scriptblock that will be executed before each task</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function will accept a scriptblock that will be executed before each
+task in the build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>TaskSetup</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>setup</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>setup</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>Running 'TaskSetup' for task Clean
+Executing task, Clean...
+Running 'TaskSetup' for task Compile
+Executing task, Compile...
+Running 'TaskSetup' for task Test
+Executing task, Test...
+
+Build Succeeded</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>Framework</command:name>
+ <maml:description>
+ <maml:para>Sets the version of the .NET framework you want to use during build.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function will accept a string containing version of the .NET framework to use during build. Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64'. Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Framework</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>framework</maml:name>
+ <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>framework</maml:name>
+ <maml:description>
+ <maml:para>Version of the .NET framework to use during build.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
+ <dev:type>
+ <maml:name>string</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <dev:code>
+Framework "4.0"
+
+Task default -depends Compile
+
+Task Compile -depends Clean {
+ msbuild /version
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above will output detailed version of msbuid v4</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>FormatTaskName</command:name>
+ <maml:description>
+ <maml:para>This function allows you to change how psake renders the task name during a build.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function takes either a string which represents a format string (formats using the -f format operator see “help about_operators”) or it can accept a script block that has a single parameter that is the name of the task that will be executed.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>FormatTaskName</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>format</maml:name>
+ <command:parameterValue required="true" variableLength="false">String or ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>format</maml:name>
+ <maml:description>
+ <maml:para>A format string or a scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String or ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>String or ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script that uses a format string is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName "-------- {0} --------"
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>-------- TaskA --------
+TaskA is executing
+-------- TaskB --------
+TaskB is executing
+-------- TaskC --------
+TaskC is executing
+
+Build Succeeded!</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script that uses a ScriptBlock is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+}
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The preceding example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.</maml:para>
+ <maml:para>Note: the $taskName parameter is arbitrary it could be named anything</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>Include</command:name>
+ <maml:description>
+ <maml:para>Include the functions or code of another powershell script file into the current build script's scope</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>A build script may declare an "includes" function which allows you to define a file containing powershell code to be included and added to the scope of the currently running build script. Code from such file will be executed after code from build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Include</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>fileNamePathToInclude</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>fileNamePathToInclude</maml:name>
+ <maml:description>
+ <maml:para>A string containing the path and name of the powershell file to include</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Include ".\build_utils.ps1"
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope</maml:para>
+ <maml:para>Note: You can have more than 1 "Include" function defined in the build script</maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>Properties</command:name>
+ <maml:description>
+ <maml:para>Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script. </maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Properties</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>properties</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>properties</maml:name>
+ <maml:description>
+ <maml:para>The script block containing all the variable assignment statements</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+}
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Note: You can have more than 1 "Properties" function defined in the build script</maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Framework</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+
+ <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
+ <command:details>
+ <command:name>Task</command:name>
+ <maml:description>
+ <maml:para>Defines a build task to be executed by psake</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function creates a 'task' object that will be used by the psake engine to execute a build task. Note: There must be at least one task called 'default' in the build script</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Task</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Name</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Action</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>PreAction</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>PostAction</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Precondition</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Postcondition</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>ContinueOnError</maml:name>
+ <command:parameterValue required="false" variableLength="false">Boolean</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Depends</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>RequiredVariables</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Description</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Name</maml:name>
+ <maml:description>
+ <maml:para>The name of the task</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Action</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock containing the statements to execute for the task.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>PreAction</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to be executed before the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>PostAction</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to be executed after the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Precondition</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock that is executed to determine if the task is executed or skipped. This scriptblock should return $true or $false</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Postcondition</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock that is executed to determine if the task completed its job correctly. An exception is thrown if the scriptblock returns $false.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>ContinueOnError</maml:name>
+ <maml:description>
+ <maml:para>If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Depends</maml:name>
+ <maml:description>
+ <maml:para>An array of task names that this task depends on. These tasks will be executed before the current task is executed.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ <dev:type>
+ <maml:name>String[]</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>RequiredVariables</maml:name>
+ <maml:description>
+ <maml:para>An array of names of variables that must be set to run this task.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ <dev:type>
+ <maml:name>String[]</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Description</maml:name>
+ <maml:description>
+ <maml:para>A description of the task.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -Depends Test
+
+Task Test -Depends Compile, Clean {
+ "This is a test"
+}
+
+Task Compile -Depends Clean {
+ "Compile"
+}
+
+Task Clean {
+ "Clean"
+}
+
+The 'default' task is required and should not contain an 'Action' parameter.
+It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+The 'Compile' task depends on the 'Clean' task.
+
+Note:
+The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+An equivalent 'Test' task is shown below:
+
+Task Test -Depends Compile, Clean -Action {
+ $testMessage
+}
+
+The output for the above sample build script is shown below:
+Executing task, Clean...
+Clean