diff --git a/.gitignore b/.gitignore index b0bfcfa8..3cc617c3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ [Rr]eleases/ x64/ x86/ -build/ bld/ [Bb]in/ [Oo]bj/ diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe deleted file mode 100644 index c41a0d0d..00000000 Binary files a/.nuget/NuGet.exe and /dev/null differ diff --git a/Build/.gitignore b/Build/.gitignore index a62c4dd3..40dfdacc 100644 --- a/Build/.gitignore +++ b/Build/.gitignore @@ -1,2 +1,2 @@ *.nupkg -lib \ No newline at end of file +*.zip \ No newline at end of file diff --git a/Build/GongSolutions.Wpf.DragDrop.ALPHA.nuspec b/Build/GongSolutions.Wpf.DragDrop.ALPHA.nuspec new file mode 100644 index 00000000..8a19c402 --- /dev/null +++ b/Build/GongSolutions.Wpf.DragDrop.ALPHA.nuspec @@ -0,0 +1,39 @@ + + + + gong-wpf-dragdrop + 1.0.0-ALPHA017 + gong-wpf-dragdrop + Jan Karger (punker76), Steven Kirk, mitchell.jon + punker76 + https://github.com/punker76/gong-wpf-dragdrop#license + https://github.com/punker76/gong-wpf-dragdrop + https://raw.github.com/punker76/gong-wpf-dragdrop/master/GongSolutions.Wpf.DragDrop.png + false + An easy to use drag'n'drop framework for WPF applications. + Copyright © 2013-2016 + WPF UI Framework Library Toolkit .NET XAML + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Build/GongSolutions.Wpf.DragDrop.nuspec b/Build/GongSolutions.Wpf.DragDrop.nuspec new file mode 100644 index 00000000..6832d2d6 --- /dev/null +++ b/Build/GongSolutions.Wpf.DragDrop.nuspec @@ -0,0 +1,39 @@ + + + + gong-wpf-dragdrop + 1.0.0 + gong-wpf-dragdrop + Jan Karger (punker76), Steven Kirk, mitchell.jon + punker76 + https://github.com/punker76/gong-wpf-dragdrop#license + https://github.com/punker76/gong-wpf-dragdrop + https://raw.github.com/punker76/gong-wpf-dragdrop/master/GongSolutions.Wpf.DragDrop.png + false + An easy to use drag'n'drop framework for WPF applications. + Copyright © 2013-2016 + WPF UI Framework Library Toolkit .NET XAML + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Build/build.cake b/Build/build.cake new file mode 100644 index 00000000..6451f065 --- /dev/null +++ b/Build/build.cake @@ -0,0 +1,107 @@ +#tool "nuget:?package=gitlink" + +// Arguments +var target = Argument("target", "Default"); +var version = "1.0.0.0"; +var infoVersion = "1.0.0"; +var alphaVersion = "1.0.0-ALPHA017"; +var configGitLink = new GitLinkSettings { + RepositoryUrl = "https://github.com/punker76/gong-wpf-dragdrop", + Branch = "master", + Configuration = "Release" +}; +var newAssemblyInfoSettings = new AssemblyInfoSettings { + Product = string.Format("GongSolutions.WPF.DragDrop {0}", version), + Version = version, + FileVersion = version, + InformationalVersion = string.Format("GongSolutions.WPF.DragDrop {0}", infoVersion), + Copyright = string.Format("Copyright © GongSolutions.WPF.DragDrop 2013 - {0}", DateTime.Now.Year) +}; + +// Tasks +Task("GitLink") + .Does(() => +{ + configGitLink.Configuration = "Release"; + GitLink("../", configGitLink); + DeleteFiles("../src/bin/**/*.srcsrv"); +}); + +Task("GitLink_Debug") + .Does(() => +{ + configGitLink.Configuration = "Debug"; + GitLink("../", configGitLink); + DeleteFiles("../src/bin/**/*.srcsrv"); +}); + +Task("UpdateAssemblyInfo") + .Does(() => +{ + CreateAssemblyInfo("../src/GlobalAssemblyInfo.cs", newAssemblyInfoSettings); +}); + +Task("UpdateAssemblyInfo_Debug") + .Does(() => +{ + newAssemblyInfoSettings.InformationalVersion = string.Format("GongSolutions.WPF.DragDrop {0}", alphaVersion); + CreateAssemblyInfo("../src/GlobalAssemblyInfo.cs", newAssemblyInfoSettings); +}); + +Task("Build") + .Does(() => +{ + MSBuild("../src/GongSolutions.WPF.DragDrop.sln", settings => settings.SetConfiguration("Release").UseToolVersion(MSBuildToolVersion.VS2015)); +}); + +Task("Build_Debug") + .Does(() => +{ + MSBuild("../src/GongSolutions.WPF.DragDrop.sln", settings => settings.SetConfiguration("Debug").UseToolVersion(MSBuildToolVersion.VS2015)); +}); + +Task("NuGetPack") + .Does(() => +{ + var nuGetPackSettings = new NuGetPackSettings { + BasePath = "../src/bin/GongSolutions.WPF.DragDrop/", + Id = "gong-wpf-dragdrop", + Version = version, + Title = "gong-wpf-dragdrop", + Copyright = string.Format("Copyright © GongSolutions.WPF.DragDrop 2013 - {0}", DateTime.Now.Year) + }; + NuGetPack("./GongSolutions.Wpf.DragDrop.nuspec", nuGetPackSettings); + nuGetPackSettings.Version = alphaVersion; + NuGetPack("./GongSolutions.Wpf.DragDrop.ALPHA.nuspec", nuGetPackSettings); +}); + +Task("ZipShowcase") + .Does(() => +{ + Zip("../src/bin/Showcase.WPF.DragDrop/Release_NET45/", "Showcase.WPF.DragDrop.Release.zip"); +}); + +Task("ZipShowcase_Debug") + .Does(() => +{ + Zip("../src/bin/Showcase.WPF.DragDrop/Debug_NET45/", "Showcase.WPF.DragDrop.Debug.zip"); +}); + +Task("CleanOutput") + .ContinueOnError() + .Does(() => +{ + CleanDirectories("../src/bin"); +}); + +// Task Targets +Task("Default").IsDependentOn("CleanOutput").IsDependentOn("UpdateAssemblyInfo").IsDependentOn("Build").IsDependentOn("GitLink").IsDependentOn("ZipShowcase"); +Task("Debug").IsDependentOn("CleanOutput").IsDependentOn("UpdateAssemblyInfo_Debug").IsDependentOn("Build_Debug").IsDependentOn("GitLink_Debug").IsDependentOn("ZipShowcase_Debug"); +Task("Appveyor") + .IsDependentOn("CleanOutput") + .IsDependentOn("UpdateAssemblyInfo").IsDependentOn("Build").IsDependentOn("GitLink").IsDependentOn("ZipShowcase") + .IsDependentOn("UpdateAssemblyInfo_Debug").IsDependentOn("Build_Debug").IsDependentOn("GitLink_Debug").IsDependentOn("ZipShowcase_Debug") + .IsDependentOn("NuGetPack"); + +// Execution +RunTarget(target); \ No newline at end of file diff --git a/Build/build.ps1 b/Build/build.ps1 new file mode 100644 index 00000000..44de5793 --- /dev/null +++ b/Build/build.ps1 @@ -0,0 +1,189 @@ +########################################################################## +# This is the Cake bootstrapper script for PowerShell. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## + +<# + +.SYNOPSIS +This is a Powershell script to bootstrap a Cake build. + +.DESCRIPTION +This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) +and execute your Cake build script with the parameters you provide. + +.PARAMETER Script +The build script to execute. +.PARAMETER Target +The build script target to run. +.PARAMETER Configuration +The build configuration to use. +.PARAMETER Verbosity +Specifies the amount of information to be displayed. +.PARAMETER Experimental +Tells Cake to use the latest Roslyn release. +.PARAMETER WhatIf +Performs a dry run of the build script. +No tasks will be executed. +.PARAMETER Mono +Tells Cake to use the Mono scripting engine. +.PARAMETER SkipToolPackageRestore +Skips restoring of packages. +.PARAMETER ScriptArgs +Remaining arguments are added here. + +.LINK +http://cakebuild.net + +#> + +[CmdletBinding()] +Param( + [string]$Script = "build.cake", + [string]$Target = "Default", + [ValidateSet("Release", "Debug")] + [string]$Configuration = "Release", + [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] + [string]$Verbosity = "Verbose", + [switch]$Experimental, + [Alias("DryRun","Noop")] + [switch]$WhatIf, + [switch]$Mono, + [switch]$SkipToolPackageRestore, + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$ScriptArgs +) + +[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null +function MD5HashFile([string] $filePath) +{ + if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) + { + return $null + } + + [System.IO.Stream] $file = $null; + [System.Security.Cryptography.MD5] $md5 = $null; + try + { + $md5 = [System.Security.Cryptography.MD5]::Create() + $file = [System.IO.File]::OpenRead($filePath) + return [System.BitConverter]::ToString($md5.ComputeHash($file)) + } + finally + { + if ($file -ne $null) + { + $file.Dispose() + } + } +} + +Write-Host "Preparing to run build script..." + +if(!$PSScriptRoot){ + $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent +} + +$TOOLS_DIR = Join-Path $PSScriptRoot "tools" +$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" +$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" +$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" +$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" +$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" + +# Should we use mono? +$UseMono = ""; +if($Mono.IsPresent) { + Write-Verbose -Message "Using the Mono based scripting engine." + $UseMono = "-mono" +} + +# Should we use the new Roslyn? +$UseExperimental = ""; +if($Experimental.IsPresent -and !($Mono.IsPresent)) { + Write-Verbose -Message "Using experimental version of Roslyn." + $UseExperimental = "-experimental" +} + +# Is this a dry run? +$UseDryRun = ""; +if($WhatIf.IsPresent) { + $UseDryRun = "-dryrun" +} + +# Make sure tools folder exists +if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { + Write-Verbose -Message "Creating tools directory..." + New-Item -Path $TOOLS_DIR -Type directory | out-null +} + +# Make sure that packages.config exist. +if (!(Test-Path $PACKAGES_CONFIG)) { + Write-Verbose -Message "Downloading packages.config..." + try { (New-Object System.Net.WebClient).DownloadFile("http://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { + Throw "Could not download packages.config." + } +} + +# Try find NuGet.exe in path if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Trying to find nuget.exe in PATH..." + $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_) } + $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 + if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { + Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." + $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName + } +} + +# Try download NuGet.exe if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Downloading NuGet.exe..." + try { + (New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE) + } catch { + Throw "Could not download NuGet.exe." + } +} + +# Save nuget.exe path to environment to be available to child processed +$ENV:NUGET_EXE = $NUGET_EXE + +# Restore tools from NuGet? +if(-Not $SkipToolPackageRestore.IsPresent) { + Push-Location + Set-Location $TOOLS_DIR + + # Check for changes in packages.config and remove installed tools if true. + [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) + if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or + ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { + Write-Verbose -Message "Missing or changed package.config hash..." + Remove-Item * -Recurse -Exclude packages.config,nuget.exe + } + + Write-Verbose -Message "Restoring tools from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occured while restoring NuGet tools." + } + else + { + $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" + } + Write-Verbose -Message ($NuGetOutput | out-string) + Pop-Location +} + +# Make sure that Cake has been installed. +if (!(Test-Path $CAKE_EXE)) { + Throw "Could not find Cake.exe at $CAKE_EXE" +} + +# Start Cake +Write-Host "Running build script..." +Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs" +exit $LASTEXITCODE \ No newline at end of file diff --git a/Build/cake.config b/Build/cake.config new file mode 100644 index 00000000..5c421deb --- /dev/null +++ b/Build/cake.config @@ -0,0 +1,13 @@ +; This is the default configuration file for Cake. +; This file was downloaded from https://github.com/cake-build/resources + +[Nuget] +Source=https://packages.nuget.org/api/v2 + +[Roslyn] +NuGetSource=https://packages.nuget.org/api/v2 + +[Paths] +Tools=./tools +Addins=./tools/Addins +Modules=./tools/Modules diff --git a/Build/tools/Cake/Autofac.dll b/Build/tools/Cake/Autofac.dll new file mode 100644 index 00000000..e4a596a9 Binary files /dev/null and b/Build/tools/Cake/Autofac.dll differ diff --git a/Build/tools/Cake/Cake.Common.dll b/Build/tools/Cake/Cake.Common.dll new file mode 100644 index 00000000..7224fa4b Binary files /dev/null and b/Build/tools/Cake/Cake.Common.dll differ diff --git a/Build/tools/Cake/Cake.Common.xml b/Build/tools/Cake/Cake.Common.xml new file mode 100644 index 00000000..2af64fba --- /dev/null +++ b/Build/tools/Cake/Cake.Common.xml @@ -0,0 +1,18975 @@ + + + + Cake.Common + + + + + AppVeyor AddMessage categories + + + + + Informational message + + + + + Warning message + + + + + Error message + + + + + AddMessage extension methods for the IAppVeyorProvider + + + + + Adds an informational message to the AppVeyor build log + + The AppVeyor provider + The message + The args + + + + Adds a warning message to the AppVeyor build log + + The AppVeyor provider + The message + The args + + + + Adds a warning message to the AppVeyor build log + + The AppVeyor provider + The message + The args + + + + Adds a warning message to the AppVeyor build log + + The AppVeyor provider + The message + The exception + + + + Provides the known values for the AppVeyor test results types. + + + + + MSTest test results. + + + + + XUnit test results. + + + + + NUnit test results. + + + + + NUnit v3 test results. + + + + + JUnit test results. + + + + + Appveyor upload artifacts settings + + + + + Sets the type of artifact being uploaded to AppVeyor + + The type of artifact being uploaded + The settings + + + + Sets the deployment name + + The deployment name to attach to the artifact, required when using the AppVeyor deployment agent. should not have any spaces + The settings + + + + Gets or sets a value indicating the type of artifact being uploaded to AppVeyor. + + + + + Gets or sets a value indicating a deployment name to set for the uploaded artifact + + + + + Provides the known artifact upload types for the AppVeyor + + + + + Automatically deploy artifact type + + + + + The artifact is a web deploy package (.zip) + + + + + The artifact is a NuGet package (.nupkg) + + + + + Provides AppVeyor environment information for a current build. + + + + + Base class used to provide information about the AppVeyor environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the AppVeyor build agent API URL. + + + The AppVeyor build agent API URL. + + + + + Gets the AppVeyor unique job ID. + + + The AppVeyor unique job ID. + + + + + Gets the AppVeyor Job Name. + + + The AppVeyor Job Name. + + + + + Gets a value indicating whether the build runs by scheduler. + + + true if the build runs by scheduler; otherwise, false. + + + + + Gets the platform name set on build tab of project settings (or through platform parameter in appveyor.yml). + + + The platform name set on build tab of project settings (or through platform parameter in appveyor.yml). + + + + + Gets the configuration name set on build tab of project settings (or through configuration parameter in appveyor.yml). + + + The configuration name set on build tab of project settings (or through configuration parameter in appveyor.yml). + + + + + Gets AppVeyor project information. + + + The AppVeyor project information. + + + + + Gets AppVeyor build information. + + + The AppVeyor build information. + + + + + Gets AppVeyor pull request information. + + + The AppVeyor pull request information. + + + + + Gets AppVeyor repository information. + + + The AppVeyor repository information. + + + + + Responsible for communicating with AppVeyor. + + + + + Represents a service that communicates with AppVeyor. + + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + The settings to apply when uploading an artifact + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + The settings to apply when uploading an artifact + + + + Uploads test results XML file to AppVeyor. Results type can be one of the following: mstest, xunit, nunit, nunit3, junit. + + The file path of the test results XML to upload. + The results type. Can be mstest, xunit, nunit, nunit3 or junit. + + + + Updates the build version. + + The new build version. + + + + Adds a message to the AppVeyor build log. Messages can be categorised as: Information, Warning or Error + + A short message to display + The category of the message + Additional message details + + + + Gets a value indicating whether the current build is running on AppVeyor. + + + true if the current build is running on AppVeyor.; otherwise, false. + + + + + Gets the AppVeyor environment. + + + The AppVeyor environment. + + + + + Initializes a new instance of the class. + + The environment. + The process runner. + The cake log. + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + The settings to apply when uploading an artifact + + + + Uploads an AppVeyor artifact. + + The file path of the artifact to upload. + The settings to apply when uploading an artifact + + + + Uploads test results XML file to AppVeyor. Results type can be one of the following: mstest, xunit, nunit, nunit3, junit. + + The file path of the test results XML to upload. + The results type. Can be mstest, xunit, nunit, nunit3 or junit. + + + + Updates the build version. + + The new build version. + + + + Adds a message to the AppVeyor build. Messages can be categorised as: Information, Warning or Error + + A short message to display + The category of the message + Additional message details + + + + Gets a value indicating whether the current build is running on AppVeyor. + + + true if the current build is running on AppVeyor.; otherwise, false. + + + + + Gets the AppVeyor environment. + + + The AppVeyor environment. + + + + + Provides AppVeyor build information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the path to the clone directory. + + + The path to the clone directory. + + + + + Gets the AppVeyor unique build ID. + + + The AppVeyor unique build ID. + + + + + Gets the build number. + + + The build number. + + + + + Gets the build version. + + + The build version. + + + + + Provides AppVeyor commit information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets commit ID (SHA). + + + The commit ID (SHA). + + + + + Gets the commit author's name. + + + The commit author's name. + + + + + Gets the commit author's email address. + + + The commit author's email address. + + + + + Gets the commit date/time. + + + The commit date/time. + + + + + Gets the commit message. + + + The commit message. + + + + + Gets the rest of commit message after line break (if exists). + + + The rest of commit message after line break (if exists). + + + + + Provides AppVeyor project information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the AppVeyor unique project ID. + + + The AppVeyor unique project ID. + + + + + Gets the project name. + + + The project name. + + + + + Gets the project slug (as seen in project details URL). + + + The project slug (as seen in project details URL). + + + + + Provides AppVeyor pull request information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether the current build was started by a pull request. + + + true if the current build was started by a pull request; otherwise, false. + + + + + Gets the GitHub pull request number. + + + The GitHub pull request number. + + + + + Gets the GitHub pull request title. + + + The GitHub pull request title. + + + + + Provides AppVeyor repository information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the repository provider. + + + github + + + bitbucket + + + kiln + + + + + The repository provider. + + + + + Gets the revision control system. + + + git + + + mercurial + + + + + The revision control system. + + + + + Gets the repository name in format owner-name/repo-name. + + + The repository name. + + + + + Gets the build branch. For pull request commits it is base branch PR is merging into. + + + The build branch. + + + + + Gets the tag information for the build. + + + The tag information for the build. + + + + + Gets the commit information for the build. + + + The commit information for the build. + + + + + Provides AppVeyor tag information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether build was started by pushed tag. + + + true if build was started by pushed tag; otherwise, false. + + + + + Gets the name for builds started by tag; otherwise this variable is undefined. + + + The name of the tag. + + + + + Base class used to provide information about the Bamboo environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Responsible for communicating with Bitrise. + + + + + Represents a Bitrise provider. + + + + + Gets a value indicating whether the current build is running on Bitrise. + + + true if the current build is running on Bitrise; otherwise, false. + + + + + Gets the Bitrise environment. + + + The Bitrise environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether the current build is running on Bitrise. + + + true if the current build is running on Bitrise; otherwise, false. + + + + + Gets the Bitrise environment. + + + The Bamboo environment. + + + + + Provides Bitrise application information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the application title. + + + The application title. + + + + + Gets the application URL. + + + The application URL. + + + + + Gets the application slug. + + + The application slug. + + + + + Provides Bitrise build information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the build number. + + + The build number. + + + + + Gets the build URL. + + + The build URL. + + + + + Gets the build slug. + + + The build slug. + + + + + Gets the build trigger timestamp. + + + The build trigger timestamp. + + + + + Gets a value indicating whether the build is passing. + + + true if [build status]; otherwise, false. + + + + + Provides Bitrise directory information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the source directory. + + + The source directory. + + + + + Gets the deploy directory. + + + The deploy directory. + + + + + Provides Bitrise environment information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Bitrise application information. + + + The application. + + + + + Gets Bitrise build information. + + + The build. + + + + + Gets Bitrise directory information. + + + The directory. + + + + + Gets Bitrise provisioning information. + + + The provisioning. + + + + + Gets Bitrise repository information. + + + The repository. + + + + + Gets Bitrise workflow information. + + + The workflow. + + + + + Provides Bitrise provisioning information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the provision URL. + + + The provision URL. + + + + + Gets the certificate URL. + + + The certificate URL. + + + + + Gets the certificate passphrase. + + + The certificate passphrase. + + + + + Provides Bitrise repository information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the git repository URL. + + + The git repository URL. + + + + + Gets the git branch. + + + The git branch. + + + + + Gets the git tag. + + + The git tag. + + + + + Gets the git commit. + + + The git commit. + + + + + Gets the pull request. + + + The pull request. + + + + + Provides Bitrise workflow information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the workflow identifier. + + + The workflow identifier. + + + + + Gets the workflow title. + + + The workflow title. + + + + + Provides functionality for interacting with + different build systems. + + + + + Initializes a new instance of the class. + + The AppVeyor Provider. + The TeamCity Provider. + The MyGet Provider. + The Bamboo Provider. + The Continua CI Provider. + The Jenkins Provider. + The Bitrise Provider. + The Travis CI provider. + The Bitbucket Pipelines provider. + + + + Gets a value indicating whether the current build is running on AppVeyor. + + + + if(BuildSystem.IsRunningOnAppVeyor) + { + // Upload artifact to AppVeyor. + AppVeyor.UploadArtifact("./build/release_x86.zip"); + } + + + + true if the build currently is running on AppVeyor; otherwise, false. + + + + + Gets the AppVeyor Provider. + + + + if(BuildSystem.IsRunningOnAppVeyor) + { + // Upload artifact to AppVeyor. + BuildSystem.AppVeyor.UploadArtifact("./build/release_x86.zip"); + } + + + + + + Gets a value indicating whether the current build is running on TeamCity. + + + + if(BuildSystem.IsRunningOnTeamCity) + { + TeamCity.ProgressMessage("Doing an action..."); + // Do action... + } + + + + true if the build currently is running on TeamCity; otherwise, false. + + + + + Gets the TeamCity Provider. + + + + if(BuildSystem.IsRunningOnTeamCiy) + { + // Set the build number. + BuildSystem.TeamCity.SetBuildNumber("1.2.3.4"); + } + + + + + + Gets a value indicating whether the current build is running on MyGet. + + + + if(BuildSystem.IsRunningOnMyGet) + { + MyGet.BuildProblem("Something went wrong..."); + // Do action... + } + + + + true if the build currently is running on MyGet; otherwise, false. + + + + + Gets the MyGet Provider. + + + + if(BuildSystem.IsRunningOnMyGet) + { + // Set the build number. + BuildSystem.MyGet.SetBuildNumber("1.2.3.4"); + } + + + + + + Gets a value indicating whether the current build is running on Bamboo. + + + + if(BuildSystem.IsRunningOnBamboo) + { + // Get the build number. + var buildNumber = BuildSystem.Bamboo.Number; + } + + + + true if the build currently is running on Bamboo; otherwise, false. + + + + + Gets the Bamboo Provider. + + + + if(BuildSystem.IsRunningOnBamboo) + { + //Get the Bamboo Plan Name + var planName = BuildSystem.Bamboo.Project.PlanName + } + + + + + + Gets a value indicating whether the current build is running on Continua CI. + + + + if(BuildSystem.IsRunningOnContinuaCI) + { + // Get the build version. + var buildVersion = BuildSystem.ContinuaCI.Environment.Build.Version; + } + + + + true if the build currently is running on Continua CI; otherwise, false. + + + + + Gets the Continua CI Provider. + + + + if(BuildSystem.IsRunningOnContinuaCI) + { + //Get the Continua CI Project Name + var projectName = BuildSystem.ContinuaCI.Environment.Project.Name; + } + + + + + + Gets a value indicating whether this instance is running on Jenkins. + + + + if(BuildSystem.IsRunningOnJenkins) + { + // Get the build number. + var buildNumber = BuildSystem.Jenkins.Environment.Build.BuildNumber; + } + + + + true if this instance is running on jenkins; otherwise, false. + + + + + Gets the Jenkins Provider. + + + The jenkins. + + + + if(BuildSystem.IsRunningOnJenkins) + { + // Get the job name. + var jobName = BuildSystem.Jenkins.Environment.Build.JobName; + } + + + + + + Gets a value indicating whether this instance is running on Bitrise. + + + + if(BuildSystem.IsRunningOnBitrise) + { + // Get the build number. + var buildNumber = BuildSystem.Bitrise.Environment.Build.BuildNumber; + } + + + + true if this instance is running on bitrise; otherwise, false. + + + + + Gets the Bitrise Provider. + + + + if(BuildSystem.IsRunningOnBitrise) + { + // Get the provision profile url. + var buildNumber = BuildSystem.Bitrise.Environment.Provisioning.ProvisionUrl; + } + + + + + + Gets a value indicating whether this instance is running on Travis CI. + + + + if(BuildSystem.IsRunningOnTravisCI) + { + // Get the build directory. + var buildDirectory = BuildSystem.TravisCI.Environment.Build.BuildDirectory; + } + + + + true if this instance is running on Travis CI; otherwise, false. + + + + + Gets the Travis CI provider. + + + + if(BuildSystem.IsRunningOnTravisCI) + { + // Get the operating system name. + var osName = BuildSystem.TravisCI.Environment.Job.OSName; + } + + + + The Travis CI. + + + + + Gets a value indicating whether this instance is running on Bitbucket Pipelines. + + + + if(BuildSystem.IsRunningOnBitbucketPipelines) + { + // Get the build commit hash. + var commitHash = BuildSystem.BitbucketPipelines.Environment.Repository.Commit; + } + + + + true if this instance is running on Bitbucket Pipelines; otherwise, false. + + + + + Gets the Bitbucket Pipelines Provider. + + + + if(BuildSystem.IsRunningOnBitbucketPipelines) + { + // Get the URL friendly repo name. + var repoSlug = BuildSystem.BitbucketPipelines.Environment.Repository.RepoSlug; + } + + + + + + Gets a value indicating whether the current build is local build. + + + + // Gets a flag telling us if this is a local build or not. + var isLocal = BuildSystem.IsLocalBuild; + + // Define a task that only runs locally. + Task("LocalOnly") + .WithCriteria(isLocal) + .Does(() => + { + }); + + + + true if the current build is local build; otherwise, false. + + + + + Contains functionality related to build systems. + + + + + Gets a instance that can + be used to query for information about the current build system. + + + + var isLocal = BuildSystem.IsLocalBuild; + + + The context. + A instance. + + + + Gets a instance that can + be used to manipulate the AppVeyor environment. + + + + var isAppVeyorBuild = AppVeyor.IsRunningOnAppVeyor; + + + The context. + A instance. + + + + Gets a instance that can + be used to manipulate the TeamCity environment. + + + + var isTeamCityBuild = TeamCity.IsRunningOnTeamCity; + + + The context. + A instance. + + + + Gets a instance that can + be used to manipulate the MyGet environment. + + + + var isMyGetBuild = MyGet.IsRunningOnMyGet; + + + The context. + A instance. + + + + Gets a instance that can + be used to manipulate the Bamboo environment. + + + + var isBambooBuild = Bamboo.IsRunningBamboo; + + + The context. + A instance. + + + + Gets a instance that can + be used to manipulate the Continua CI environment. + + + + var isContinuaCIBuild = ContinuaCI.IsRunningContinuaCI; + + + The context. + A instance. + + + + Gets a instance that can be user to + obtain information from the Jenkins environment. + + + + var isJenkinsBuild = Jenkins.IsRunningOnJenkins; + + + The context. + A instance. + + + + Gets a instance that can be user to + obtain information from the Bitrise environment. + + + + var isBitriseBuild = Bitrise.IsRunningOnBitrise; + + + The context. + A instance. + + + + Gets a instance that can be user to + obtain information from the Travis CI environment. + + + + var isTravisCIBuild = TravisCI.IsRunningOnTravisCI; + + + The context. + A instance. + + + + Gets a instance that can be user to + obtain information from the Bitbucket Pipelines environment. + + + + var isBitbucketPipelinesBuild = BitbucketPipelines.IsRunningOnBitbucketPipelines; + + + The context. + A instance. + + + + Base class used to provide information about the Continua CI environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as an array of . + + The environment variable name. + The environment variable value split by comma into an array of values. + + + + Gets matching list of environment variables as an dictionary of . + + The prefix for the environment variables name. + A dictionary of environment variables starting with variablePrefix + + + + Provides Continua CI build information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + The prefix for environment variables in this clas + + + + Gets the build id. + + + + + Gets the build version. + + + + + Gets the name of the user or trigger starting the build. + + + + + Gets a value indicating whether the build uses the feature branch. + + + + + Gets the build number. + + + + + Gets the build start date and time. + + + + + Gets a value indicating whether the build uses the default branch. + + + + + Gets a value indicating whether the build has new changes. + + + + + Gets build the number of changesets associated with this build + + + + + Gets build the number of issues associated with this build + + + + + Gets build elapsed time on queue as a time span. + + + + + Gets build time on queue in ticks. + + + + + Gets list of repository names + + + + + Gets list of repository branch names + + + + + Gets triggering branch name + + + + + Gets list of changeset revisions + + + + + Gets list of changeset user names + + + + + Gets list of changeset tag names + + + + + Gets the latest build changeset + + + + + Provides Continua CI changeset information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + The environment variable key prefix. + + + + Gets the revision used to build this release. Format depends on the VCS used. + + + + + Gets the changeset branch name + + + + + Gets the changeset created date and time. + + + + + Gets the count of the number of files in the changeset. + + + + + Gets the changeset author user/committer name + + + + + Gets the count of the number of tags associated with the changeset. + + + + + Gets the count of the number of tags associated with the changeset. + + + + + Gets list of changeset tag names + + + + + Gets list of changeset issue names + + + + + Provides Continua CI environment information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Continua CI configuration information. + + + The Continua CI configuration information. + + + + + Gets Continua CI project information. + + + The Continua CI project information. + + + + + Gets Continua CI build information. + + + The Continua CI build information. + + + + + Gets Continua CI build variables. + + + The Continua CI build variables. + + + + + Gets Continua CI build agent properties + + + The Continua CI build agent properties. + + + + + Gets Continua CI product version. + + + The Continua CI product version. + + + + + Provides Continua CI project information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + The environment variable key prefix. + + + + Gets the Continua CI Project Name + + + The Continua CI Project Name. + + + + + Provides Continua CI configuration information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + The environment variable key prefix. + + + + Gets the Continua CI Configuration Name + + + The Continua CI Configuration Name. + + + + + Represents a Continua CI provider. + + + + + Write a status message to the Continua CI build log. + + Message contents. + Build status. + + + + Write the start of a message group to the Continua CI build log. + + Group name. + + + + Write the end of a message block to the Continua CI build log. + + Group name. + + + + Set a Continua CI build variable. + + Name of the variable to set. + Value to assign to the variable. + Set to 'true' to prevent the build failing if the variable has not been defined for the configuration.. + + + + Set a Continua CI build version. + + The new build version. + + + + Set a Continua CI build status message, which is shown on the build details page when a build is running. + + The new build status text. + + + + Gets a value indicating whether the current build is running on Continua CI. + + + true if the current build is running on Continua CI; otherwise, false. + + + + + Gets the Continua CI environment. + + + The Continua CI environment. + + + + + Provides the known values for Continua CI Message Types + + + + + Debug Message + + + + + Success Message + + + + + Information Message + + + + + Warning Message + + + + + Error Message + + + + + Fatal Message + + + + + Responsible for communicating with Continua CI. + + + + + Initializes a new instance of the class. + + The cake environment. + + + + Write a status message to the Continua CI build log. + + Message contents. + Build status. + + + + Write the start of a message group to the Continua CI build log. + + Group name. + + + + Write the end of a message block to the Continua CI build log. + + Group name. + + + + Set a Continua CI build variable. + + Name of the variable to set. + Value to assign to the variable. + Set to 'true' to prevent the build failing if the variable has not been defined for the configuration.. + + + + Set a Continua CI build version. + + The new build version. + + + + Set a Continua CI build status message, which is shown on the build details page when a build is running. + + The new build status text. + + + + Gets a value indicating whether the current build is running on Continua CI. + + + true if the current build is running on Continua CI; otherwise, false. + + + + + Gets the Continua CI environment. + + + The Continua CI environment. + + + + + Provides Jenkins build information for a current build. + + + + + Base class used to provide information about the Jenkins environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the build number. + + + The build number. + + + + + Gets the build identifier. + + + The build identifier. + + + + + Gets the display name of the build. + + + The display name of the build. + + + + + Gets the build URL. + + + The build URL. + + + + + Gets the build URL. + + + The build URL. + + + + + Gets the executor number. + + + The executor number. + + + + + Provides Jenkins environment information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Jenkins build information. + + + The build. + + + + + Gets Jenkins repository information. + + + The repository. + + + + + Gets Jenkins job information. + + + The job. + + + + + Gets the node. + + + The node. + + + + + Gets the jenkins home. + + + The jenkins home. + + + + + Gets the jenkins URL. + + + The jenkins URL. + + + + + Gets the executor number. + + + The executor number. + + + + + Gets the workspace. + + + The workspace. + + + + + Provides Jenkins node information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the name of the node. + + + The name of the node. + + + + + Gets the node labels. + + + The node labels. + + + + + Provides Jenkins repository information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the git commit sha. + + + The git commit sha. + + + + + Gets the git branch. + + + The git branch. + + + + + Gets the SVN revision. + + + The SVN revision. + + + + + Gets the CVS branch. + + + The CVS branch. + + + + + Gets the SVN URL. + + + The SVN URL. + + + + + Provides Jenkins job information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the name of the job. + + + The name of the job. + + + + + Gets the name of the job. + + + The name of the job. + + + + + Represnts a Jenkins Provider + + + + + Gets a value indicating whether this instance is running on jenkins. + + + true if this instance is running on jenkins; otherwise, false. + + + + + Gets the Jenkins environment. + + + The Jenkins environment. + + + + + Responsible for communicating with Jenkins. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether this instance is running on jenkins. + + + true if this instance is running on jenkins; otherwise, false. + + + + + Gets the Jenkins environment. + + + The Jenkins environment. + + + + + Represents a MyGet provider. + + + + + Report a build problem to MyGet. + + Description of build problem. + + + + Allows setting an environment variable that can be used by a future process. + + Name of the parameter to set. + Value to assign to the parameter. + + + + Write a status message to the MyGet build log. + + Message contents. + Build status. + Error details if status is error. + + + + Tells MyGet to change the current build number. + + The required build number. + + + + Gets a value indicating whether the current build is running on MyGet. + + + true if the current build is running on MyGet; otherwise, false. + + + + + Responsible for communicating with MyGet. + + + + + Initializes a new instance of the class. + + The cake environment. + + + + Report a build problem to MyGet. + + Description of build problem. + + + + Allows setting an environment variable that can be used by a future process. + + Name of the parameter to set. + Value to assign to the parameter. + + + + Write a status message to the MyGet build log. + + Message contents. + Build status. + Error details if status is error. + + + + Tells MyGet to change the current build number. + + The required build number. + + + + Gets a value indicating whether the current build is running on MyGet. + + + true if the current build is running on MyGet; otherwise, false. + + + + + Provides the known values for MyGet Build Status + + + + + Failure Status + + + + + Error Status + + + + + Warning Status + + + + + Normal Status + + + + + Provides Bitbucket Pipelines environment information for the current build. + + + + + Base class used to provide information about the Bitbucket Pipelines environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Bitbucket Pipelines repository information. + + + The repository. + + + + + Provides Bitbucket Pipelines repository information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the branch on which the build was kicked off. This value is only available on branches. + + Note: and are mutually exclusive. If you use both, only one will have a value. + + The SCM branch. + + + + + Gets the tag on which the build was kicked off. This value is only available when tagged. + + Note: and are mutually exclusive. If you use both, only one will have a value. + + The SCM tag. + + + + + Gets the commit hash of a commit that kicked off the build. + + + The SCM commit. + + + + + Gets the name of the account in which the repository lives. + + + The repository owner account. + + + + + Gets the URL-friendly version of a repository name. + + + The URL-friendly repository name. + + + + + Responsible for communicating with Pipelines. + + + + + Represents a Bitrise provider. + + + + + Gets a value indicating whether the current build is running on Bitbucket Pipelines. + + + true if the current build is running on Bitbucket Pipelines; otherwise, false. + + + + + Gets the Bitbucket Pipelines environment. + + + The Bitbucket Pipelines environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether the current build is running on Pipelines. + + + true if the current build is running on Pipelines; otherwise, false. + + + + + Gets the Pipelines environment. + + + The Pipelines environment. + + + + + Represents a TeamCity provider. + + + + + Report a build problem to TeamCity. + + Description of build problem. + Build identity. + + + + Tell TeamCity to import data of a given type. + + Date type. + Data file path. + + + + Tell TeamCity to import coverage from dotCover snapshot file. + + Snapshot file path. + The full path to the dotCover home folder to override the bundled dotCover. + + + + Tells TeamCity to publish artifacts in the given directory. + + Path to artifacts. + + + + Tells TeamCity to change the current build number. + + The required build number. + + + + Write the end of a message block to the TeamCity build log. + + Block name. + + + + Write the end of a build block to the TeamCity build log. + + Build compiler name. + + + + Write a progressFinish message to the TeamCity build log. + + Build log message. + + + + Write a progress message to the TeamCity build log. + + Build log message. + + + + Write the start of a message block to the TeamCity build log. + + Block name. + + + + Write the start of a build block to the TeamCity build log. + + Build compiler name. + + + + Write a progressStart message to the TeamCity build log. + + Build log message. + + + + Write a status message to the TeamCity build log. + + Message contents. + Build status. + Error details if status is error. + + + + Gets a value indicating whether the current build is running on TeamCity. + + + true if the current build is running on TeamCity; otherwise, false. + + + + + A set of extensions for allowing "using" with TeamCity "blocks". + + + + + Writes the start of a TeamCity message block, then returns a disposable that write the end on Dispose. + + TeamCity provider. + The name of the report block. + A disposable wrapper the writes the report block end. + + + + Writes the start of a TeamCity build block, then returns a disposable that write the end on Dispose. + + TeamCity provider. + The name of the build block. + A disposable wrapper the writes the build block end. + + + + Disposable helper for writing TeamCity message blocks. + + + + + Initializes a new instance of the class. + + TeamCity provider. + The action to do on Dispose. + + + + Writes the end block for this message block. + + + + + Responsible for communicating with TeamCity. + + + + + Initializes a new instance of the class. + + The cake environment. + The cake log. + + + + Write a progress message to the TeamCity build log. + + Build log message. + + + + Write a progressStart message to the TeamCity build log. + + Build log message. + + + + Write a progressFinish message to the TeamCity build log. + + Build log message. + + + + Write the start of a message block to the TeamCity build log. + + Block name. + + + + Write the end of a message block to the TeamCity build log. + + Block name. + + + + Write the start of a build block to the TeamCity build log. + + Build compiler name. + + + + Write the end of a build block to the TeamCity build log. + + Build compiler name. + + + + Write a status message to the TeamCity build log. + + Message contents. + Build status. + Error details if status is error. + + + + Tell TeamCity to import data of a given type. + + Date type. + Data file path. + + + + Tell TeamCity to import coverage from dotCover snapshot file. + + Snapshot file path. + The full path to the dotCover home folder to override the bundled dotCover. + + + + Report a build problem to TeamCity. + + Description of build problem. + Build identity. + + + + Tells TeamCity to publish artifacts in the given directory. + + Path to artifacts. + + + + Tells TeamCity to change the current build number. + + The required build number. + + + + Tells TeamCity to set a named parameter with a given value + + The name of the parameter to set. + The value to set for the named parameter. + + + + Gets a value indicating whether the current build is running on TeamCity. + + + true if the current build is running on TeamCity; otherwise, false. + + + + + Represents a Bamboo provider. + + + + + Gets a value indicating whether the current build is running on Bamboo. + + + true if the current build is running on Bamboo; otherwise, false. + + + + + Gets the Bamboo environment. + + + The Bamboo environment. + + + + + Responsible for communicating with Bamboo. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether the current build is running on Bamboo. + + + true if the current build is running on Bamboo.; otherwise, false. + + + + + Gets the Bamboo environment. + + + The Bamboo environment. + + + + + Base class used to provide information about the Bamboo environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Provides Bamboo environment information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Bamboo plan information. + + + The Bamboo plan information. + + + + + Gets Bamboo build information. + + + The Bamboo build information. + + + + + Gets Bamboo repository information. + + + The Bamboo repository information. + + + + + Provides Bamboo build information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the path to the clone directory. + + + The path to the clone directory. + + + + + Gets the build number. + + + The build number. + + + + + Gets the job key for the current job, in the form PROJECT-PLAN-JOB, e.g. BAM-MAIN-JOBX + + + The Bamboo Build Key. + + + + + Gets the Bamboo Build Result Key. + The result key when this job executes, in the form PROJECT-PLAN-JOB-BUILD e.g. BAM-BOO-JOB1-8, where '8' is the build number. + For deployment projects this variable will not have the JOB component e.g. PROJ-TP-6. + + + The Build Result Key. + + + + + Gets the URL of the result in Bamboo once the job has finished executing. + + + The Bamboo build result url. + + + + + Gets the time when build was started in ISO 8601 format e.g. 2010-01-01T01:00:00.000+01:00. + + + The Bamboo build timestamp. + + + + + Gets Bamboo custom build information. + + + The Bamboo custom build information. + + + + + Provides Bamboo commit information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the revision use to build this release. Format depends on the VCS used. + + + The commit ID (SHA). + + + + + Provides Bamboo repository information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the revision control system. + + + Subversion + + + CVS + + + Perforce + + + Git + + + Mercurial + + + + + The revision control system. + + + + + Gets the repository name as named in Bamboo + + + The bamboo repository name. + + + + + Gets the build branch. + + + The build branch. + + + + + Gets the commit information for the build. + + + The commit information for the build. + + + + + Provides Bamboo tag information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets a value indicating whether build was started by pushed tag. + + + true if build was started by pushed tag; otherwise, false. + + + + + Gets the name for builds started by tag; otherwise this variable is undefined. + + + The name of the tag. + + + + + Provides Travis CI build information for the current build. + + + + + Base class used to provide information about the Travis CI environment. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Gets an environment variable as a . + + The environment variable name. + The environment variable. + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the branch for the current build. + + + The branch. + + + + + Gets the build directory for the current build. + + + The build directory. + + + + + Gets the build identifier for the current build. + + + The build identifier. + + + + + Gets the build number for the current build. + + + The build number. + + + + + Gets the test result indicating if the current build is successful or broken. + + + The test result. + + + + + Gets the tag name for the current build. + + + The tag. + + + + + Provides Travis CI job information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the job identifier for the current job.. + + + The job identifier. + + + + + Gets the job number for the current job. + + + The job number. + + + + + Gets the name of the operating system for the current job. + + + The name of the os. + + + + + Gets a value indicating whether encrypted environment variables are being used for the current job. + + + true if [secure environment variables are in use]; otherwise, false. + + + + + Provides Travis CI environment information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets Travis CI build information for the current build. + + + The build. + + + + + Gets Travis CI job information for the current build. + + + The job. + + + + + Gets Travis CI repository information for the current build. + + + The repository. + + + + + Gets a value indicating whether the current build is continuous integration. + + + true if ci; otherwise, false. + + + + + Gets the Travis CI home directory. + + + The home. + + + + + Gets a value indicating whether the environment is Travis. + + + true if Travis; otherwise, false. + + + + + Provides Travis CI repository information for the current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the commit that the current build is testing. + + + The commit. + + + + + Gets the commit range for the current pull request. + + + The commit range. + + + + + Gets the pull request. + + + The pull request. + + + + + Gets the slug of the respository currently being built. + + + The slug. + + + + + Represents a Travis CI Provider. + + + + + Write the start of a message fold to the Travis CI build log. + + Name of the group. + + + + Write the start of a message fold to the Travis CI build log. + + Name of the group. + + + + Gets a value indicating whether this instance is running on Travis CI. + + + true if this instance is running on Travis CI; otherwise, false. + + + + + Gets the environment. + + + The environment. + + + + + A set of extensions for allowing "using" with Travis CI "blocks". + + + + + Folds travis log output. + + The Travis CI provider. + The name. + An . + + + + Disposable helper for writing Travis CI message blocks. + + + + + Initializes a new instance of the class. + + The Travis CI provider. + The dispose action. + + + + Writes the end block for this message block. + + + + + Responsible for communicating with Travis CI. + + + + + Initializes a new instance of the class. + + The environment. + The log. + + + + Write the start of a message fold to the Travis CI build log. + + Name of the group. + + + + Write the start of a message fold to the Travis CI build log. + + Name of the group. + + + + Gets the Travis CI environment. + + + The environment. + + + + + Gets a value indicating whether this instance is running on Travis CI. + + + true if this instance is running on Travis CI; otherwise, false. + + + + + Represents a that can be easily converted. + + To get the underlying : + + ConvertableDirectoryPath convertable = Directory("./root"); + DirectoryPath path = (DirectoryPath)convertable; + + To combine two directories: + + ConvertableDirectoryPath path = Directory("./root") + Directory("other"); + + To combine a directory with a file: + + ConvertableFilePath path = Directory("./root") + File("other.txt"); + + + + + + + Initializes a new instance of the class. + + The path. + + + + Operator that combines A instance + with another instance. + + The left directory path operand. + The right directory path operand. + A new directory path representing a combination of the two provided paths. + + + + Operator that combines A instance + with a instance. + + The left directory path operand. + The right directory path operand. + A new directory path representing a combination of the two provided paths. + + + + Operator that combines A instance + with a instance. + + The left directory path operand. + The right file path operand. + A new file path representing a combination of the two provided paths. + + + + Operator that combines A instance + with a instance. + + The left directory path operand. + The right file path operand. + A new file path representing a combination of the two provided paths. + + + + Performs an implicit conversion from to . + + The path. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The path. + The result of the conversion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the path. + + The path. + + + + Represents a that can be easily converted. + + + + + Initializes a new instance of the class. + + The path. + + + + Performs an implicit conversion from to . + + The path. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The path. + The result of the conversion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the path. + + The actual path. + + + + This namespace contain types used for common operations + such as parsing release notes, retrieving arguments and + to read and write environment variables. + + + + + This namespace contain types that + support different build system related tasks. + + + + + This namespace contain types used + to interact with AppVeyor. + + + + + This namespace contain types + representing data used for interaction with AppVeyor. + + + + + This namespace contain types used + to interact with TeamCity. + + + + + This namespace contain types that + enable you to interact with build logs. + + + + + This namespace contain types that support input and output, + including the ability to read and write data to streams and to + interact with the file system. + + + + + This namespace contain types related + to file system paths. + + + + + This namespace contain types related + to network operations. + + + + + This namespace contain types related + to security aspects such as hashing. + + + + + This namespace contain types that + support interaction with MSBuild solution files. + + + + + This namespace contain types that + support interaction with MSBuild project files. + + + + + This namespace contain types that + enable you to read or create assembly information files. + + + + + This namespace contain types that + enable you to read XML documentation comments. + + + + + This namespace contain types for + text templating and transformations. + + + + + This namespace contain types used to interact + with different third party tools. + + + + + This namespace contain types used to interact with Cake. + + + + + This namespace contain types used to interact with ILMerge. + + + + + This namespace contain types used to interact with MSBuild. + + + + + This namespace contain types used to interact with MSTest. + + + + + This namespace contain types used to interact with NuGet. + + + + + This namespace contain types used to interact + with the NuGet package installer. + + + + + This namespace contain types used to + pack NuGet packages. + + + + + This namespace contain types used to + push NuGet packages. + + + + + This namespace contain types used to + restore NuGet packages. + + + + + This namespace contain types used to + set NuGet API keys. + + + + + This namespace contain types used to + set proxy settings. + + + + + This namespace contain types used to + interact with NuGet sources. + + + + + This namespace contain types used to + update NuGet packages. + + + + + This namespace contain types used to interact with NUnit. + + + + + This namespace contain types used + to interact with Octopus Deploy. + + + + + This namespace contain types used + to interact with Roundhouse. + + + + + This namespace contain types used for + signing assemblies with SignTool. + + + + + This namespace contain types used to interact with WiX. + + + + + This namespace contain types used + to interact with XBuild. + + + + + This namespace contain types used to interact with XUnit. + + + + + This namespace contain types used to + interact with XML documents. + + + + + The hash algorithm to use for a specific operation. + + + + + The MD5 hash algorithm. + + + + + The SHA256 hash algorithm. + + + + + The SHA512 hash algorithm. + + + + + Represents a calculated file hash. + + + + + Initializes a new instance of the class. + + The file path. + The computed hash. + The algorithm used. + + + + Convert the file hash to a hexadecimal string. + + A hexadecimal string representing the computed hash. + + + + Gets the algorithm used for the hash computation. + + + + + Gets the for the file. + + + + + Gets the raw computed hash. + + + + + Represents a file hash operation. + + + + + Initializes a new instance of the class. + + The file system. + + + + Calculates the hash for a file using the given algorithm. + + The file path. + The algorithm to use. + A instance representing the calculated hash. + + + + Contains security related functionality, such as calculating file + hashes. + + + + + Calculates the hash for a given file using the default (SHA256) algorithm. + + The context. + The file path. + A instance representing the calculated hash. + + + Information( + "Cake executable file SHA256 hash: {0}", + CalculateFileHash("Cake.exe").ToHex()); + + + + + + Calculates the hash for a given file. + + The context. + The file path. + The hash algorithm to use. + A instance representing the calculated hash. + + + Information( + "Cake executable file MD5 hash: {0}", + CalculateFileHash("Cake.exe", HashAlgorithm.MD5).ToHex()); + + + + + + Contains functionality related to MSBuild project files. + + + + + Parses project information from project file + + The context. + The project file path. + A parsed project. + + + var parsedProject = ParseProject("./src/Cake/Cake.csproj"); + Information( + @" Parsed project file: + Configuration : {0} + Platform : {1} + OutputType : {2} + OutputPath : {3} + RootNameSpace : {4} + AssemblyName : {5} + TargetFrameworkVersion: {6} + Files : {7}", + parsedProject.Configuration, + parsedProject.Platform, + parsedProject.OutputType, + parsedProject.OutputPath, + parsedProject.RootNameSpace, + parsedProject.AssemblyName, + parsedProject.TargetFrameworkVersion, + string.Concat( + parsedProject + .Files + .Select( + file=> string.Format( + "\r\n {0}", + file.FilePath + ) + ) + ) + ); + + + + + + Represents a MSBuild project file. + + + + + Gets or sets the project file path. + + The project file path. + + + + Gets or sets the relative path to the project file. + + + The relative path to the project file. + + + + + Gets or sets a value indicating whether this is compiled. + + + true if compiled; otherwise, false. + + + + + The MSBuild project file parser. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Parses a project file. + + The project path. + The parsed project. + + + + Represents the content in an MSBuild project file. + + + + + Initializes a new instance of the class. + + The build configuration. + The target platform. + The unique project identifier. + The compiler output type. + The compiler output path + The default root namespace. + Gets the build target assembly name. + The compiler framework version. + The compiler framework profile. + The project content files. + The references. + The references to other projects. + + + + Gets the build configuration. + + The build configuration. + + + + Gets the target platform. + + The platform. + + + + Gets the unique project identifier. + + The unique project identifier. + + + + Gets the compiler output type, i.e. Exe/Library. + + The output type. + + + + Gets the compiler output path. + + The output path. + + + + Gets the default root namespace. + + The root namespace. + + + + Gets the build target assembly name. + + The assembly name. + + + + Gets the compiler target framework version. + + The target framework version. + + + + Gets the compiler target framework profile. + + The target framework profile. + + + + Gets the project content files. + + The files. + + + + Gets the references. + + + The references. + + + + + Gets the references to other projects. + + + The references. + + + + + Represents a project reference to another project. + + + Schema from https://msdn.microsoft.com/en-us/library/ms164283.aspx + and https://msdn.microsoft.com/en-us/library/bb629388.aspx + + + + + Gets or sets the path to the referenced project file. + + + The path to the referenced project file. + + + + + Gets or sets the relative path to the referenced project file. + + + The relative path to the referenced project file. + + + + + Gets or sets the display name of the reference. + + + The display name of the reference. + + + + + Gets or sets a GUID for the reference. + + + A GUID for the reference. + + + + + Gets or sets the path of the project file that is being referenced. + + + The path of the project file that is being referenced. + + + + + Represents a project assembly reference. + + + Schema from https://msdn.microsoft.com/en-us/library/ms164283.aspx + and https://msdn.microsoft.com/en-us/library/bb629388.aspx + + + + + Gets or sets the reference to include. + + + The reference to include. + + + + + Gets or sets the relative or absolute path of the assembly. + + + The relative or absolute path of the assembly. + + + + + Gets or sets the display name of the assembly. + + + The display name of the assembly. + + + + + Gets or sets the simple or strong fusion name for the item. + + + The simple or strong fusion name for the item. + + + + + Gets or sets whether only the version in the fusion name should be referenced. + + + Whether only the version in the fusion name should be referenced. + + + + + Gets or sets any aliases for the reference. + + + Any aliases for the reference. + + + + + Gets or sets whether the reference should be copied to the output folder. + + + Whether the reference should be copied to the output folder. + + + + + MSBuild Project Xml Element XNames + + + + + Project root element + + + + + Item group element + + + + + Assembly reference element + + + + + Namespace import element + + + + + Namespace compile element + + + + + Namespace property group element + + + + + Namespace root namespace element + + + + + Namespace output type element + + + + + Namespace output path element + + + + + Namespace assembly name element + + + + + Gets the namespace for the target framework version element. + + + + + Gets the namespace for the target framework version element. + + + + + Gets the namespace for the configuration element. + + + + + Gets the namespace for the platform element. + + + + + Gets the namespace for the project GUID. + + + + + Gets the namespace for the bootstrapper package element. + + + + + Gets the namespace for the project reference element. + + + + + Gets the namespace for the service element. + + + + + Gets the namespace for the hint path element. + + + + + Gets the namespace for the name element. + + + + + Gets the namespace for the fusion name element. + + + + + Gets the namespace for the specific version element. + + + + + Gets the namespace for the aliases element. + + + + + Gets the namespace for the private element. + + + + + Gets the namespace for the package element. + + + + + The assembly info creator. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The log. + + + + Creates an assembly info file. + + The output path. + The settings. + + + + Contains functionality related to assembly info. + + + + + Creates an assembly information file. + + The context. + The output path. + The settings. + + + var file = "./SolutionInfo.cs"; + var version = "0.0.1"; + var buildNo = "123"; + var semVersion = string.Concat(version + "-" + buildNo); + CreateAssemblyInfo(file, new AssemblyInfoSettings { + Product = "SampleProject", + Version = version, + FileVersion = version, + InformationalVersion = semVersion, + Copyright = string.Format("Copyright (c) Contoso 2014 - {0}", DateTime.Now.Year) + }); + + + + + + Parses an existing assembly information file. + + The context. + The assembly info path. + The content of the assembly info file. + + + var assemblyInfo = ParseAssemblyInfo("./SolutionInfo.cs"); + Information("Version: {0}", assemblyInfo.AssemblyVersion); + Information("File version: {0}", assemblyInfo.AssemblyFileVersion); + Information("Informational version: {0}", assemblyInfo.AssemblyInformationalVersion); + + + + + + The assembly info parser. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Parses information from an assembly info file. + + The file path. + Information about the assembly info content. + + + + Represents the content in an assembly info file. + + + + + Initializes a new instance of the class. + + Whether the assembly is CLS compliant. + The assembly company attribute. + Whether the assembly is accessible from COM. + The assembly configuration attribute. + The assembly copyright attribute. + The assembly description attribute. + The assembly file version. + The assembly GUID attribute. + The assembly informational version. + The assembly product attribute. + The assembly title attribute. + The assembly trademark attribute. + The assembly version. + The assemblies that internals are visible to. + + + + Gets a value indicating whether the assembly is CLS compliant. + + + true if the assembly is CLS compliant; otherwise, false. + + + + + Gets the assembly company attribute. + + The assembly company attribute. + + + + Gets a value indicating whether the assembly is accessible from COM. + + + true if the assembly is accessible from COM; otherwise, false. + + + + + Gets the assembly configuration attribute. + + The assembly Configuration attribute. + + + + Gets the assembly copyright attribute. + + The assembly copyright attribute. + + + + Gets the assembly's description attribute. + + The assembly's Description attribute. + + + + Gets the assembly file version. + + The assembly file version. + + + + Gets the assembly GUID attribute. + + The assembly GUID attribute. + + + + Gets the assembly informational version. + + The assembly informational version. + + + + Gets the assembly product Attribute. + + The assembly product attribute. + + + + Gets the assembly title Attribute. + + The assembly Title attribute. + + + + Gets the assembly trademark Attribute. + + The assembly Trademark attribute. + + + + Gets the assembly version. + + The assembly version. + + + + Gets the assemblies that internals are visible to. + + The assemblies that internals are visible to. + + + + Contains settings used by . + + + + + Gets or sets the title. + + The assembly title. + + + + Gets or sets the description. + + The assembly description. + + + + Gets or sets the unique identifier. + + The unique identifier. + + + + Gets or sets the product. + + The assembly product. + + + + Gets or sets the copyright. + + The copyright. + + + + Gets or sets the trademark. + + The trademark. + + + + Gets or sets the version. + + The version. + + + + Gets or sets the file version. + + The file version. + + + + Gets or sets the informational version. + + The informational version. + + + + Gets or sets whether or not the assembly is COM visible. + + Whether or not the assembly is COM visible. + + + + Gets or sets whether or not the assembly is CLS compliant. + + Whether or not the assembly is CLS compliant. + + + + Gets or sets the company. + + The company. + + + + Gets or sets the name(s) of the assembly(s) that internals should be visible to. + + The name(s) of the assembly(s). + + + + Gets or sets the configuration of the assembly. + + The configuration. + + + + Contains functionality related to logging. + + + + + Writes an error message to the log using the specified format information. + + The context. + The format. + The arguments. + + + Error("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now); + + + + + + Writes an error message to the log using the specified log message action. + Evaluation message only if verbosity same or more verbose. + + the context. + The function called for message when logging. + + + Error(logAction=>logAction("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now)); + + + + + + Writes a warning message to the log using the specified format information. + + The context. + The format. + The arguments. + + + Warning("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now); + + + + + + Writes a warning message to the log using the specified log message action. + Evaluation message only if verbosity same or more verbose. + + the context. + The function called for message when logging. + + + Warning(logAction=>logAction("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now)); + + + + + + Writes an informational message to the log using the specified format information. + + The context. + The format. + The arguments. + + + Information("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now); + + + + + + Writes an informational message to the log using the specified log message action. + Evaluation message only if verbosity same or more verbose. + + the context. + The function called for message when logging. + + + Information(logAction=>logAction("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now)); + + + + + + Writes a verbose message to the log using the specified format information. + + The context. + The format. + The arguments. + + + Verbose("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now); + + + + + + Writes a verbose message to the log using the specified log message action. + Evaluation message only if verbosity same or more verbose. + + the context. + The function called for message when logging. + + + Verbose(logAction=>logAction("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now)); + + + + + + Writes a debug message to the log using the specified format information. + + The context. + The format. + The arguments. + + + Debug("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now); + + + + + + Writes a debug message to the log using the specified log message action. + Evaluation message only if verbosity same or more verbose. + + the context. + The function called for message when logging. + + + Debug(logAction=>logAction("Hello {0}! Today is an {1:dddd}", "World", DateTime.Now)); + + + + + + Contains functionality related to the environment. + + + + + Retrieves the value of the environment variable or null if the environment variable do not exist. + + + + Information(EnvironmentVariable("HOME") ?? "Unknown location"); + + + The context. + The environment variable. + The environment variable or null if the environment variable do not exist. + + + + Retrieves all environment variables + + + + var envVars = EnvironmentVariables(); + + string path; + if (envVars.TryGetValue("PATH", out path)) + { + Information("Path: {0}", path); + } + + foreach(var envVar in envVars) + { + Information( + "Key: {0}\tValue: \"{1}\"", + envVar.Key, + envVar.Value + ); + } + + + The context. + The environment variables + + + + Checks for the existence of a value for a given environment variable. + + + + if (HasEnvironmentVariable("SOME_ENVIRONMENT_VARIABLE")) + { + Information("The environment variable was present."); + } + + + The context. + The environment variable. + + true if the environment variable exist; otherwise false. + + + + + Determines whether the build script is running on Windows. + + + + if (IsRunningOnWindows()) + { + Information("Windows!"); + } + + + The context. + + true if the build script is running on Windows; otherwise false. + + + + + Determines whether the build script running on a Unix or Linux based system. + + + + if (IsRunningOnUnix()) + { + Information("Not Windows!"); + } + + + The context. + + true if the build script running on a Unix or Linux based system; otherwise false. + + + + + Contains functionality related to processes. + + + + + Starts the process resource that is specified by the filename. + + The context. + The file name. + The exit code that the started process specified when it terminated. + + + var exitCodeWithoutArguments = StartProcess("ping"); + // This should output 1 as argument is missing + Information("Exit code: {0}", exitCodeWithoutArguments); + + + + + + Starts the process resource that is specified by the filename and arguments + + The context. + Name of the file. + The arguments used in the process settings. + The exit code that the started process specified when it terminated. + + + var exitCodeWithArgument = StartProcess("ping", "localhost"); + // This should output 0 as valid arguments supplied + Information("Exit code: {0}", exitCodeWithArgument); + + + + + + Starts the process resource that is specified by the filename and settings. + + The context. + Name of the file. + The settings. + The exit code that the started process specified when it terminated. + + + var exitCodeWithArgument = StartProcess("ping", new ProcessSettings{ Arguments = "localhost" }); + // This should output 0 as valid arguments supplied + Information("Exit code: {0}", exitCodeWithArgument); + + + + + + Starts the process resource that is specified by the filename and settings. + + The context. + Name of the file. + The settings. + outputs process output RedirectStandardOutput is true + The exit code that the started process specified when it terminated. + + + IEnumerable<string> redirectedOutput; + var exitCodeWithArgument = StartProcess("ping", new ProcessSettings{ + Arguments = "localhost", + RedirectStandardOutput = true + }, + out redirectedOutput + ); + //Output last line of process output + Information("Last line of output: {0}", redirectedOutput.LastOrDefault()); + + // This should output 0 as valid arguments supplied + Information("Exit code: {0}", exitCodeWithArgument); + + + + + + Starts the process resource that is specified by the filename and settings. + + The context. + Name of the file. + The settings. + The newly started process. + + + using(var process = StartAndReturnProcess("ping", new ProcessSettings{ Arguments = "localhost" })) + { + process.WaitForExit(); + // This should output 0 as valid arguments supplied + Information("Exit code: {0}", process.GetExitCode()); + } + + + , , or is null. + + + + Starts the process resource that is specified by the filename. + + The context. + Name of the file. + The newly started process. + + + using(var process = StartAndReturnProcess("ping")) + { + process.WaitForExit(); + // This should output 0 as valid arguments supplied + Information("Exit code: {0}", process.GetExitCode()); + } + + + , is null. + + + + Represent release notes. + + + + + Initializes a new instance of the class. + + The version. + The notes. + The raw text of the version line. + + + + Gets the version. + + The version. + + + + Gets the release notes. + + The release notes. + + + + Gets the raw text of the line that was extracted from. + + The raw text of the Version line. + + + + Contains functionality related to release notes. + + + + + Parses all release notes. + + The context. + The file path. + All release notes. + + + var releaseNotes = ParseAllReleaseNotes("./ReleaseNotes.md"); + foreach(var releaseNote in releaseNotes) + { + Information("Version: {0}", releaseNote.Version); + foreach(var note in releaseNote.Notes) + { + Information("\t{0}", note); + } + } + + + + + + Parses the latest release notes. + + The context. + The file path. + The latest release notes. + + + var releaseNote = ParseReleaseNotes("./ReleaseNotes.md"); + Information("Version: {0}", releaseNote.Version); + foreach(var note in releaseNote.Notes) + { + Information("\t{0}", note); + } + + + + + + The release notes parser. + + + + + Initializes a new instance of the class. + + + + + Parses all release notes. + + The content. + All release notes. + + + + Parsed Xml documentation example code + + + + + Initializes a new instance of the class. + + The name of code parent. + The example code. + + + + Gets Example code parent name + + + + + Gets Example code + + + + + The MSBuild Xml documentation example code parser + + + + + Initializes a new instance of the class. + + The file system. + The globber. + The log. + + + + Parses Xml documentation example code from given path + + Path to the file to parse. + Parsed Example Code + + + + Parses Xml documentation example code from file(s) using given pattern + + The globber file pattern. + Parsed Example Code + + + + Contains functionality related to MSBuild XML document files. + + + + + Parses Xml documentation example code from given path. + + The context. + The Path to the file to parse. + Parsed example code. + + + var exampleCodes = ParseXmlDocExampleCode("./Cake.Common.xml"); + foreach(var exampleCode in exampleCodes) + { + Information( + "{0}\r\n{1}", + exampleCode.Name, + exampleCode.Code + ); + } + + + + + + Parses Xml documentation example code from file(s) using given pattern. + + The context. + The globber file pattern. + Parsed example code. + + + var filesExampleCodes = ParseXmlDocFilesExampleCode("./Cake.*.xml"); + foreach(var exampleCode in filesExampleCodes) + { + Information( + "{0}\r\n{1}", + exampleCode.Name, + exampleCode.Code + ); + } + + + + + + Contains functionality related to MSBuild solution files. + + + + + Parses project information from a solution file. + + The context. + The solution path. + A parsed solution. + + + var solutionPath = "./src/Cake.sln"; + Information("Parsing {0}", solutionPath); + var parsedSolution = ParseSolution(solutionPath); + foreach(var project in parsedSolution.Projects) + { + Information( + @"Solution project file: + Name: {0} + Path: {1} + Id : {2} + Type: {3}", + project.Name, + project.Path, + project.Id, + project.Type + ); + } + + + + + + The MSBuild solution file parser. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Parses a MSBuild solution. + + The solution path. + A parsed solution. + + + + Represents the content in an MSBuild solution file. + + + + + Initializes a new instance of the class. + + The file format version. + The version of Visual Studio that created the file. + The minimum supported version of Visual Studio. + The solution projects. + + + + Gets the file format version. + + + + + Gets the version of Visual Studio that created the file. + + + + + Gets the minimum supported version of Visual Studio. + + + + + Gets all solution projects. + + + + + Represents a folder in a MSBuild solution. + + + + + Represents a project in a MSBuild solution. + + + + + Initializes a new instance of the class. + + The project identity. + The project name. + The project path. + The project type identity. + + + + Gets the project identity. + + + + + Gets the project name. + + + + + Gets the project path. + + + + + Gets the project type identity. + + + + + Gets the parent project if any, otherwise null. + + + + + Visual Studio project type guid for solution folder + + + More information can be found http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs + + + + + Initializes a new instance of the class. + + The folder project identity. + The folder name. + The folder path. + + + + Gets Child items of this folder + + + + + Contains functionality related to text transformation. + + + + + Creates a text transformation from the provided template. + + The context. + The template. + A representing the provided template. + + This sample shows how to create a using + the specified template. + + string text = TransformText("Hello <%subject%>!") + .WithToken("subject", "world") + .ToString(); + + + + + + Creates a text transformation from the provided template, using the specified placeholder. + + The context. + The template. + The left placeholder. + The right placeholder. + A representing the provided template. + + This sample shows how to create a using + the specified template and placeholder. + + string text = TransformText("Hello {subject}!", "{", "}") + .WithToken("subject", "world") + .ToString(); + + + + + + Creates a text transformation from the provided template on disc. + + The context. + The template file path. + A representing the provided template. + + This sample shows how to create a using + the specified template file with the placeholder format <%key%>. + + string text = TransformTextFile("./template.txt") + .WithToken("subject", "world") + .ToString(); + + + + + + Creates a text transformation from the provided template on disc, using the specified placeholder. + + The context. + The template file path. + The left placeholder. + The right placeholder. + A representing the provided template. + + This sample shows how to create a using + the specified template file and placeholder. + + string text = TransformTextFile("./template.txt", "{", "}") + .WithToken("subject", "world") + .ToString(); + + + + + + Provides functionality to perform simple text transformations + from a Cake build script and save them to disc. + + The text transformation template. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The text template. + + + + Saves the text transformation to a file. + + The to save the test transformation to. + + + + Returns a string containing the rendered template. + + A string containing the rendered template. + + + + Gets the text transformation template. + + The text transformation template. + + + + Contains extension methods for . + + + + + Registers a key and a value to be used with the + text transformation. + + The text transformation template. + The text transformation. + The key. + The value. + + The same instance so that multiple calls can be chained. + + + + + Contains functionality related to running Cake scripts out of process. + + + + + Executes cake script out of process + + The context. + The script file. + + + CakeExecuteScript("./helloworld.cake"); + + + + + + Executes cake script out of process + + The context. + The script file. + The settings . + + + CakeExecuteScript("./helloworld.cake", new CakeSettings{ ToolPath="./Cake.exe" }); + + + + + + Executes Cake expression out of process + + The context. + The cake expression + + + CakeExecuteExpression("Information(\"Hello {0}\", \"World\");"); + + + + + + Executes Cake expression out of process + + The context. + The cake expression + The settings . + + + CakeExecuteExpression( + "Information(\"Hello {0}!\", Argument<string>(\"name\"));", + new CakeSettings { + ToolPath="./Cake.exe" , + Arguments = new Dictionary<string, string>{{"name", "World"}} + }); + + + + + + Cake out process runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The globber. + The process runner. + The tool locator. + + + + Executes supplied cake script in own process and supplied settings + + Path to script to execute + optional cake settings + + + + Executes supplied cake code expression in own process and supplied settings + + Code expression to execute + optional cake settings + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the name of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Contains settings used by . + + + + + Gets or sets the output verbosity. + + The output verbosity. + + + + Gets or sets cake additional arguments. + + The properties. + + + + The Chocolatey package pinner used to pin Chocolatey packages. + + + + + Base class for all Chocolatey related tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Pins Chocolatey packages using the specified package id and settings. + + The API key. + The Server URL where the API key is valid. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Contains functionality for working with Chocolatey. + + In order to use the commands for this alias, Chocolatey will require to be installed on the machine where the build script + is being run. See this page for details on how + Chocolatey can be installed. + + + + + + Creates a Chocolatey package using the specified Nuspec file. + + The context. + The nuspec file path. + The settings. + + + var chocolateyPackSettings = new ChocolateyPackSettings { + Id = "TestChocolatey", + Title = "The tile of the package", + Version = "0.0.0.1", + Authors = new[] {"John Doe"}, + Owners = new[] {"Contoso"}, + Summary = "Excellent summary of what the package does", + Description = "The description of the package", + ProjectUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + PackageSourceUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + ProjectSourceUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + DocsUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + MailingListUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + BugTrackerUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + Tags = new [] {"Cake", "Script", "Build"}, + Copyright = "Some company 2015", + LicenseUrl = new Uri("https://github.com/SomeUser/TestChocolatey/blob/master/LICENSE.md"), + RequireLicenseAcceptance= false, + IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestChocolatey/master/icons/testchocolatey.png"), + ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"}, + Files = new [] { + new ChocolateyNuSpecContent {Source = "bin/TestChocolatey.dll", Target = "bin"}, + }, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }; + + ChocolateyPack("./nuspec/TestChocolatey.nuspec", chocolateyPackSettings); + + + + + + Creates a Chocolatey package using the specified settings. + + The context. + The settings. + + + var chocolateyPackSettings = new ChocolateyPackSettings { + Id = "TestChocolatey", + Title = "The tile of the package", + Version = "0.0.0.1", + Authors = new[] {"John Doe"}, + Owners = new[] {"Contoso"}, + Summary = "Excellent summary of what the package does", + Description = "The description of the package", + ProjectUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + PackageSourceUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + ProjectSourceUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + DocsUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + MailingListUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + BugTrackerUrl = new Uri("https://github.com/SomeUser/TestChocolatey/"), + Tags = new [] {"Cake", "Script", "Build"}, + Copyright = "Some company 2015", + LicenseUrl = new Uri("https://github.com/SomeUser/TestChocolatey/blob/master/LICENSE.md"), + RequireLicenseAcceptance= false, + IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestChocolatey/master/icons/testchocolatey.png"), + ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"}, + Files = new [] { + new ChocolateyNuSpecContent {Source = "bin/TestChocolatey.dll", Target = "bin"}, + }, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }; + + ChocolateyPack(chocolateyPackSettings); + + + + + + Installs a Chocolatey package. + + The context. + The id of the package to install. + + + ChocolateyInstall("MyChocolateyPackage"); + + + + + + Installs a Chocolatey package using the specified settings. + + The context. + The id of the package to install. + The settings. + + + ChocolateyInstall("MyChocolateyPackage", new ChocolateyInstallSettings { + Source = true, + Version = "1.2.3", + Prerelease = false, + Forcex86 = false, + InstallArguments = "arg1", + OverrideArguments = false, + NotSilent = false, + PackageParameters = "param1", + AllowDowngrade = false, + SideBySide = false, + IgnoreDependencies = false, + ForceDependencies = false, + SkipPowerShell = false, + User = "user", + Password = "password", + IgnoreChecksums = false, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Installs Chocolatey packages using the specified package configuration. + + The context. + The package configuration to install. + + + ChocolateyInstallFromConfig("./tools/packages.config"); + + + + + + Installs Chocolatey packages using the specified package configuration and settings. + + The context. + The package configuration to install. + The settings. + + + ChocolateyInstallFromConfig("./tools/packages.config", new ChocolateyInstallSettings { + Source = true, + Version = "1.2.3", + Prerelease = false, + Forcex86 = false, + InstallArguments = "arg1", + OverrideArguments = false, + NotSilent = false, + PackageParameters = "param1", + AllowDowngrade = false, + SideBySide = false, + IgnoreDependencies = false, + ForceDependencies = false, + SkipPowerShell = false, + User = "user", + Password = "password", + IgnoreChecksums = false, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Pins a Chocolatey package using the specified settings. + + The context. + The name. + The settings. + + + ChocolateyPin("MyChocolateyPackage", new ChocolateyPinSettings { + Version = "1.2.3", + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Sets the Api Key for a Chocolatey Source using the specified settings. + + The context. + The API Key. + The source. + The settings. + + + ChocolateyApiKey("myApiKey", "http://www.mysource.com", new ChocolateyApiKeySettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Sets the config parameter using the specified settings. + + The context. + The name. + The value. + The settings. + + + ChocolateyConfig("cacheLocation", @"c:\temp", new ChocolateyConfigSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Enables a Chocolatey Feature using the specified name + + The context. + Name of the feature. + + + ChocolateyEnableFeature("checkSumFiles"); + + + + + + Enables a Chocolatey Feature using the specified name and settings + + The context. + Name of the feature. + The settings. + + + ChocolateyEnableFeature("checkSumFiles", new ChocolateyFeatureSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Disables a Chocolatey Feature using the specified name + + The context. + Name of the feature. + + + ChocolateyDisableFeature("checkSumFiles"); + + + + + + Disables a Chocolatey Feature using the specified name and settings + + The context. + Name of the feature. + The settings. + + + ChocolateyDisableFeature("checkSumFiles", new ChocolateyFeatureSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Adds Chocolatey package source using the specified name &source to global user config + + The context. + Name of the source. + Path to the package(s) source. + + + ChocolateyAddSource("MySource", "http://www.mysource.com"); + + + + + + Adds Chocolatey package source using the specified name, source & settings to global user config + + The context. + Name of the source. + Path to the package(s) source. + The settings. + + + ChocolateyAddSource("MySource", "http://www.mysource.com", new ChocolateySourcesSettings { + UserName = "user", + Password = "password", + Priority = 13, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Removes Chocolatey package source using the specified name & source from global user config + + The context. + Name of the source. + + + ChocolateyRemoveSource("MySource"); + + + + + + Removes Chocolatey package source using the specified name, source & settings from global user config + + The context. + Name of the source. + The settings. + + + ChocolateyRemoveSource("MySource", new ChocolateySourcesSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Enables a Chocolatey Source using the specified name + + The context. + Name of the source. + + + ChocolateyEnableSource("MySource"); + + + + + + Enables a Chocolatey Source using the specified name and settings + + The context. + Name of the source. + The settings. + + + ChocolateyEnableSource("MySource", new ChocolateySourcesSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Disables a Chocolatey Source using the specified name + + The context. + Name of the source. + + + ChocolateyDisableSource("MySource"); + + + + + + Disables a Chocolatey Source using the specified name and settings + + The context. + Name of the source. + The settings. + + + ChocolateyDisableSource("MySource", new ChocolateySourcesSettings { + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Pushes a Chocolatey package to a Chocolatey server and publishes it. + + The context. + The .nupkg file path. + The settings. + + + // Get the path to the package. + var package = "./chocolatey/MyChocolateyPackage.0.0.1.nupkg"; + + // Push the package. + ChocolateyPush(package, new ChocolateyPushSettings { + Source = "http://example.com/chocolateyfeed", + ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a" + Timeout = 300 + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Upgrades Chocolatey package. + + The context. + The id of the package to upgrade. + + + ChocolateyUpgrade("MyChocolateyPackage"); + + + + + + Upgrades Chocolatey package using the specified settings. + + The context. + The id of the package to upgrade. + The settings. + + + ChocolateyUpgrade("MyChocolateyPackage", new ChocolateyUpgradeSettings { + Source = true, + Version = "1.2.3", + Prerelease = false, + Forcex86 = false, + InstallArguments = "arg1", + OverrideArguments = false, + NotSilent = false, + PackageParameters = "param1", + AllowDowngrade = false, + SideBySide = false, + IgnoreDependencies = false, + SkipPowerShell = false, + FailOnUnfound = false, + FailOnNotInstalled = false, + User = "user", + Password = "password", + IgnoreChecksums = false, + Debug = false, + Verbose = false, + Force = false, + Noop = false, + LimitOutput = false, + ExecutionTimeout = 13, + CacheLocation = @"C:\temp", + AllowUnofficial = false + }); + + + + + + Contains Chocolatey path resolver functionality + + + + + Represents a Chocolatey path resolver. + + + + + Resolves the path to choco.exe. + + The path to choco.exe. + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Resolves the path to choco.exe. + + The path to choco.exe. + + + + The Chocolatey configuration setter. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Sets Chocolatey configuration paramaters using the settings. + + The name of the config parameter. + The value to assign to the parameter. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + The Chocolatey feature toggler used to enable/disable Chocolatey Features. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Pins Chocolatey packages using the specified package id and settings. + + The name of the feature. + The settings. + + + + Pins Chocolatey packages using the specified package id and settings. + + The name of the feature. + The settings. + + + + The Chocolatey package installer used to install Chocolatey packages. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Installs Chocolatey packages using the specified package configuration file and settings. + + Path to package configuration to use for install. + The settings. + + + + Installs Chocolatey packages using the specified package id and settings. + + The source package id. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to accept license for package. + + The accept license flag + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets a package sources to use for this command. + + The package source to use for this command. + + + + Gets or sets the version of the package to install. + If none specified, the latest will be used. + + + + + Gets or sets a value indicating whether to allow installation of prerelease packages. + This flag is not required when restoring packages by installing from packages.config. + + + true to allow installation of prerelease packages; otherwise, false. + + + + + Gets or sets a value indicating whether to force installation of the x86 version of package. + + The force x86 flag + + + + Gets or sets the install arguments to pass to native installer. + + + + + Gets or sets a value indicating whether to override the passed arguments. + + The override arguments flag + + + + Gets or sets a value indicating whether or not to install silently. + + The not silent flag + + + + Gets or sets the parameters to pass to the package. + + + + + Gets or sets a value indicating whether to allow downgrade of package. + + The downgrade package flag + + + + Gets or sets a value indicating whether to allow side by side installation. + + The side by side installation flag + + + + Gets or sets a value indicating whether to ignore dependencies. + + The ignore dependencies flag + + + + Gets or sets a value indicating whether to force dependencies. + + The force dependencies flag + + + + Gets or sets a value indicating whether to skip the PowerShell installation of package. + + The skip powershell flag + + + + Gets or sets the user for authenticated feeds. + + + + + Gets or sets the password for authenticated feeds. + + + + + Gets or sets a value indicating whether to ignore checksums. + + The ignore checksums flag + + + + Represents a Chocolatey nuspec file + + + + + Gets or sets the location of the file or files to include. + The path is relative to the NuSpec file unless an absolute path is specified. + The wildcard character - * - is allowed. + Using a double wildcard - ** implies a recursive directory search. + + + + + Gets or sets the relative path to the directory within the package where the source files will be placed. + + + + + Gets or sets the file or files to exclude. + This is usually combined with a wildcard value in the src attribute. + The exclude attribute can contain a semi-colon delimited list of files or a file pattern. + Using a double wildcard - ** - implies a recursive exclude pattern. + + + + + The Chocolatey packer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The log. + The tool locator. + The Chocolatey tool resolver + + + + Creates a Chocolatey package from the specified settings. + + The settings. + + + + Creates a Chocolatey package from the specified Nuspec file. + + The nuspec file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the package ID. + + The package ID. + + + + Gets or sets the package title. + + The package title. + + + + Gets or sets the Nuspec version. + + The Nuspec version. + + + + Gets or sets the package authors. + + The package authors. + + + + Gets or sets the package owners. + + The package owners. + + + + Gets or sets the package summary. + + The package summary. + + + + Gets or sets the package description. + + The package description. + Markdown format is allowed for this property + + + + Gets or sets the package project URL. + + The package project URL. + + + + Gets or sets the package Source URL. + + The package Source URL. + Requires at least Chocolatey 0.9.9.7. + + + + Gets or sets the package project Source URL. + + The package project Source URL. + Requires at least Chocolatey 0.9.9.7. + + + + Gets or sets the package documentation URL. + + The package documenation URL. + Requires at least Chocolatey 0.9.9.7. + + + + Gets or sets the package mailing list URL. + + The package mailing list URL. + Requires at least Chocolatey 0.9.9.7. + + + + Gets or sets the package bug tracker URL. + + The package bug tracker URL. + Requires at least Chocolatey 0.9.9.7. + + + + Gets or sets the package tags. + + The package tags. + + + + Gets or sets the package copyright. + + The package copyright. + + + + Gets or sets the package license URL. + + The package license URL. + + + + Gets or sets a value indicating whether users has to accept the package license. + + + true if users has to accept the package license; otherwise, false. + + + + + Gets or sets the package icon URL. + + The package icon URL. + + + + Gets or sets the package release notes. + + The package release notes. + Markdown format is allowed for this property + + + + Gets or sets the package files. + + The package files. + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets a value indicating the Working Directory that should be used while running choco.exe. + + + + + The Chocolatey package pinner used to pin Chocolatey packages. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Pins Chocolatey packages using the specified package id and settings. + + The name of the package. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets the version of the package to install. + If none specified, the latest will be used. + + + + + The Chocolatey package pusher. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Pushes a Chocolatey package to a Chocolatey server and publishes it. + + The package file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets the server URL. If not specified, chocolatey.org is used. + + The server URL. + + + + Gets or sets the API key for the server. + + The API key for the server. + + + + Gets or sets the timeout for pushing to a server. + Defaults to 300 seconds (5 minutes). + + The timeout for pushing to a server. + + + + The Chocolatey sources is used to work with user config feeds & credentials + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Adds Chocolatey package source using the specified settings to global user config + + Name of the source. + Path to the package(s) source. + The settings. + + + + Remove specified Chocolatey package source + + Name of the source. + The settings. + + + + Enable specified Chocolatey package source + + Name of the source. + The settings. + + + + Disable specified Chocolatey package source + + Name of the source. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets the (optional) user name. + + Optional user name to be used when connecting to an authenticated source. + + + + Gets or sets the (optional) password. + + Optional password to be used when connecting to an authenticated source. + + + + Gets or sets the (optional) priority. + + Optional priority to be used when creating source. + + + + The Chocolatey package upgrader. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The Chocolatey tool resolver. + + + + Upgrades Chocolatey packages using the specified settings. + + The source package id. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to run in debug mode. + + The debug flag + + + + Gets or sets a value indicating whether to run in verbose mode. + + The verbose flag. + + + + Gets or sets a value indicating whether to accept license for package. + + The accept license flag + + + + Gets or sets a value indicating whether to run in forced mode. + + The force flag + + + + Gets or sets a value indicating whether to run in noop mode. + + The noop flag. + + + + Gets or sets a value indicating whether to run in limited output mode. + + The limit output flag + + + + Gets or sets the execution timeout value. + + The execution timeout + Default is 2700 seconds + + + + Gets or sets the location of the download cache. + + The download cache location + + + + Gets or sets a value indicating whether to run in allow unofficial mode. + + The allow unofficial flag + + + + Gets or sets the source to use for this command. + + + + + Gets or sets the Nuspec version. + + The Nuspec version. + + + + Gets or sets a value indicating whether to allow upgrading to prerelease versions. + This flag is not required when updating prerelease packages that are already installed. + + + true to allow updating to prerelease versions; otherwise, false. + + + + + Gets or sets a value indicating whether to force installation of the x86 version of package. + + The force x86 flag + + + + Gets or sets the install arguments to pass to native installer. + + + + + Gets or sets a value indicating whether to override the passed arguments. + + The override arguments flag + + + + Gets or sets a value indicating whether or not to install silently. + + The not silent flag + + + + Gets or sets the parameters to pass to the package. + + + + + Gets or sets a value indicating whether to allow downgrade of package. + + The downgrade package flag + + + + Gets or sets a value indicating whether to allow side by side installation. + + The side by side installation flag + + + + Gets or sets a value indicating whether to ignore dependencies. + + The ignore dependencies flag + + + + Gets or sets a value indicating whether to skip the PowerShell installation of package. + + The skip powershell flag + + + + Gets or sets a value indicating whether to fail on unfound packages. + + The skip powershell flag + + + + Gets or sets a value indicating whether to fail on not installed packages. + + The skip powershell flag + + + + Gets or sets the user for authenticated feeds. + + + + + Gets or sets the password for authenticated feeds. + + + + + Gets or sets a value indicating whether to ignore checksums. + + The ignore checksums flag + + + + DNU project builder. + + + + + Base class for all DNU related tools + + The settings type + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Build the project using the specified path and settings. + + The target file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a list of frameworks to use. + + + + + Gets or sets a list of configurations to use. + + + + + Gets or sets the output directory. + + + + + Gets or sets a value indicating whether to not show output such as dependencies in use. + + + + + Contains functionality for working with the DNU Utility. + These aliases have been marked as Obsolete. Use the instead. + + + + + Restore all NuGet Packages. + + The context. + + + DNURestore(); + + + + + + Restore all NuGet Packages in the specified path. + + The context. + The file to restore. + + + var projects = GetFiles("./src/**/project.json"); + foreach(var project in projects) + { + DNURestore(project); + } + + + + + + Restore all NuGet Packages with the settings. + + The context. + The settings. + + + var settings = new DNURestoreSettings + { + Sources = new[] {"https://www.example.com/nugetfeed", "https://www.example.com/nugetfeed2"}, + FallbackSources = new[] {"https://www.example.com/fallbacknugetfeed"}, + Proxy = "exampleproxy", + NoCache = true, + Packages = "./packages", + IgnoreFailedSources = true, + Quiet = true, + Parallel = true, + Locked = DNULocked.Lock, + Runtimes = new[] {"runtime1", "runtime2"} + }; + + DNURestore(settings); + + + + + + Restore all NuGet Packages in the specified path with settings. + + The context. + The file to restore. + The settings. + + + var settings = new DNURestoreSettings + { + Sources = new[] {"https://www.example.com/nugetfeed", "https://www.example.com/nugetfeed2"}, + FallbackSources = new[] {"https://www.example.com/fallbacknugetfeed"}, + Proxy = "exampleproxy", + NoCache = true, + Packages = "./packages", + IgnoreFailedSources = true, + Quiet = true, + Parallel = true, + Locked = DNULocked.Lock, + Runtimes = new[] {"runtime1", "runtime2"} + }; + + var projects = GetFiles("./src/**/project.json"); + foreach(var project in projects) + { + DNURestore(project, settings); + } + + + + + + Build all projects. + + The context. + The projects path. + + + DNUBuild("./src/*"); + + + + + + Build all projects. + + The context. + The projects path. + The settings. + + + var settings = new DNUBuildSettings + { + Frameworks = new[] { "dnx451", "dnxcore50" }, + Configurations = new[] { "Debug", "Release" }, + OutputDirectory = "./artifacts/", + Quiet = true + }; + + DNUBuild("./src/*", settings); + + + + + + Pack all projects. + + The context. + The projects path. + + + DNUPack("./src/*"); + + + + + + Pack all projects. + + The context. + The projects path. + The settings. + + + var settings = new DNUPackSettings + { + Frameworks = new[] { "dnx451", "dnxcore50" }, + Configurations = new[] { "Debug", "Release" }, + OutputDirectory = "./artifacts/", + Quiet = true + }; + + DNUPack("./src/*", settings); + + + + + + DNU NuGet package packer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Create NuGet packages using the specified path and settings. + + The target file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a list of frameworks to use. + + + + + Gets or sets a list of configurations to use. + + + + + Gets or sets the output directory. + + + + + Gets or sets a value indicating whether to not show output such as dependencies in use. + + + + + Represents DNU Locked + + + + + Locked: Lock + + + + + Locked: Unlock + + + + + DNU NuGet package restorer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Restores NuGet packages using the specified path and settings. + + The project path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a list of packages sources to use for this command. + + + + + Gets or sets a list of packages sources to use as a fallback. + + + + + Gets or sets the HTTP proxy to use when retrieving packages. + + + + + Gets or sets a value indicating whether to not use local cache. + + + + + Gets or sets the path to restore packages. + + + + + Gets or sets a value indicating whether to ignore failed remote sources if there are local packages meeting version requirements. + + + + + Gets or sets a value indicating whether to not show output such as HTTP request/cache information. + + + + + Gets or sets a value indicating whether to restores in parallel when more than one project.json is discovered. + + + + + Gets or sets to creates dependencies file with locked property. Overwrites file if it exists. + + + + + Gets or sets a list of runtime identifiers to restore for. + + + + + Contains settings used by . + + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets program working directory + This represents the /TargetWorkingDir option. + + + + + Gets the assemblies loaded in the specified scope into coverage results. + Ant-style patterns are supported here (e.g.ProjectFolder/**/*.dll) + This represents the /Scope option. + + + + + Gets the coverage filters using the following syntax: +:module=*;class=*;function=*; + Use -:myassembly to exclude an assembly from code coverage. + Asterisk wildcard (*) is supported here. + This represents the /Filters option. + + + + + Gets the attribute filters using the following syntax: filter1;filter2;... + Asterisk wildcard(*) is supported here + This represents the /AttributeFilters option. + + + + + Gets or sets a value indicating whether the default (automatically added) filters should be disabled + This represents the /DisableDefaultFilters option. + + + + + Gets or sets the type of the report. + This represents the /ReportType option. + The Default value is . + + + + + DotCover Analyser builder. + + + + + Base class for all DotCover related tools + + The settings type + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs DotCover Analyse with the specified settings. + + The context. + The action. + The output file path. + The settings. + + + + Contains settings used by . + + + + + DotCover Coverer builder. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs DotCover Cover with the specified settings. + + The context. + The action. + The output file path. + The settings. + + + + Represents DotCover ReportType + + + + + ReportType: XML + + + + + ReportType: HTML + + + + + ReportType: JSON + + + + + ReportType: DetailedXML + + + + + ReportType: NDependXML + + + + + Contains functionality related to DotCover. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the appropriate settings class: + + #tool "nuget:?package=JetBrains.dotCover.CommandLineTools" + + + + + + + Runs DotCover Analyse + for the specified action and settings. + + The context. + The action to run DotCover for. + The DotCover output file. + The settings. + + + DotCoverAnalyse(tool => { + tool.XUnit2("./**/App.Tests.dll", + new XUnit2Settings { + ShadowCopy = false + }); + }, + new FilePath("./result.xml"), + new DotCoverAnalyseSettings() + .WithFilter("+:App") + .WithFilter("-:App.Tests")); + + + + + + Runs DotCover Cover + for the specified action and settings. + + The context. + The action to run DotCover for. + The DotCover output file. + The settings. + + + DotCoverCover(tool => { + tool.XUnit2("./**/App.Tests.dll", + new XUnit2Settings { + ShadowCopy = false + }); + }, + new FilePath("./result.dcvr"), + new DotCoverCoverSettings() + .WithFilter("+:App") + .WithFilter("-:App.Tests")); + + + + + + Contains extensions for . + + + + + Adds the scope. + + The settings. + The scope. + The settings type, derived from + The same instance so that multiple calls can be chained. + + + + Adds the filter + + The settings. + The filter. + The settings type, derived from + The same instance so that multiple calls can be chained. + + + + Adds the attribute filter + + The settings. + The filter. + The settings type, derived from + The same instance so that multiple calls can be chained. + + + + .NET Core project builder. + + + + + Base class for all .NET Core related tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Creates a and adds common commandline arguments. + + The settings. + Instance of . + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Build the project using the specified path and settings. + + The target project path. + The settings. + + + + Contains settings used by . + + + + + Contains common settings used by . + + + + + Gets or sets a value indicating whether to not enable verbose output. + + + + + Gets or sets the directory in which to place temporary outputs. + + + + + Gets or sets the output directory. + + + + + Gets or sets the target runtime. + + + + + Gets or sets the configuration under which to build. + + + + + Gets or sets the specific framework to compile. + + + + + Gets or sets the value that defines what `*` should be replaced with in version field in project.json. + + + + + Gets or sets a value indicating whether to print the incremental safety checks that prevent incremental compilation. + + + + + Gets or sets a value indicating whether to mark the build as unsafe for incrementality. + This turns off incremental compilation and forces a clean rebuild of the project dependency graph. + + + + + Gets or sets a value indicating whether to ignore project to project references and only build the root project. + + + + + Contains functionality related to .NET Core CLI. + + In order to use the commands for this alias, the .Net Core CLI tools will need to be installed on the machine where + the Cake script is being executed. See this page for information + on how to install. + + + + + + Execute an assembly. + + The context. + The assembly path. + + + DotNetCoreExecute("./bin/Debug/app.dll"); + + + + + + Execute an assembly with arguments in the specific path. + + The context. + The assembly path. + The arguments. + + + DotNetCoreExecute("./bin/Debug/app.dll", "--arg"); + + + + + + Execute an assembly with arguments in the specific path with settings. + + The context. + The assembly path. + The arguments. + The settings. + + + var settings = new DotNetCoreSettings + { + Verbose = true + }; + + DotNetCoreExecute("./bin/Debug/app.dll", "--arg", settings); + + + + + + Restore all NuGet Packages. + + The context. + + + DotNetCoreRestore(); + + + + + + Restore all NuGet Packages in the specified path. + + The context. + List of projects and project folders to restore. Each value can be: a path to a project.json or global.json file, or a folder to recursively search for project.json files. + + + DotNetCoreRestore("./src/*"); + + + + + + Restore all NuGet Packages with the settings. + + The context. + The settings. + + + var settings = new DotNetCoreRestoreSettings + { + Sources = new[] {"https://www.example.com/nugetfeed", "https://www.example.com/nugetfeed2"}, + FallbackSources = new[] {"https://www.example.com/fallbacknugetfeed"}, + PackagesDirectory = "./packages", + Verbosity = Information, + DisableParallel = true, + InferRuntimes = new[] {"runtime1", "runtime2"} + }; + + DotNetCoreRestore(settings); + + + + + + Restore all NuGet Packages in the specified path with settings. + + The context. + List of projects and project folders to restore. Each value can be: a path to a project.json or global.json file, or a folder to recursively search for project.json files. + The settings. + + + var settings = new DotNetCoreRestoreSettings + { + Sources = new[] {"https://www.example.com/nugetfeed", "https://www.example.com/nugetfeed2"}, + FallbackSources = new[] {"https://www.example.com/fallbacknugetfeed"}, + PackagesDirectory = "./packages", + Verbosity = Information, + DisableParallel = true, + InferRuntimes = new[] {"runtime1", "runtime2"} + }; + + DotNetCoreRestore("./src/*", settings); + + + + + + Build all projects. + + The context. + The projects path. + + + DotNetCoreBuild("./src/*"); + + + + + + Build all projects. + + The context. + The projects path. + The settings. + + + var settings = new DotNetCoreBuildSettings + { + Framework = "netcoreapp1.0", + Configuration = "Debug", + OutputDirectory = "./artifacts/" + }; + + DotNetCoreBuild("./src/*", settings); + + + + + + Package all projects. + + The context. + The projects path. + + + DotNetCorePack("./src/*"); + + + + + + Package all projects. + + The context. + The projects path. + The settings. + + + var settings = new DotNetCorePackSettings + { + Configuration = "Release", + OutputDirectory = "./artifacts/" + }; + + DotNetCorePack("./src/*", settings); + + + + + + Run all projects. + + The context. + + + DotNetCoreRun(); + + + + + + Run project. + + The context. + The project path. + + + DotNetCoreRun("./src/Project"); + + + + + + Run project with path and arguments. + + The context. + The project path. + The arguments. + + + DotNetCoreRun("./src/Project", "--args"); + + + + + + Run project with settings. + + The context. + The project path. + The arguments. + The settings. + + + var settings = new DotNetCoreRunSettings + { + Framework = "netcoreapp1.0", + Configuration = "Release" + }; + + DotNetCoreRun("./src/Project", "--args", settings); + + + + + + Publish all projects. + + The context. + The projects path. + + + DotNetCorePublish("./src/*"); + + + + + + Publish all projects. + + The context. + The projects path. + The settings. + + + var settings = new DotNetCorePublishSettings + { + Framework = "netcoreapp1.0", + Configuration = "Release", + OutputDirectory = "./artifacts/" + }; + + DotNetCorePublish("./src/*", settings); + + + + + + Test project. + + The context. + + + DotNetCoreTest(); + + + + + + Test project with path. + + The context. + The project path. + + + DotNetCoreTest("./src/Project"); + + + + + + Test project with settings. + + The context. + The project path. + The settings. + + + var settings = new DotNetCoreRunSettings + { + Configuration = "Release" + }; + + DotNetCoreRun("./test/Project.Tests", settings); + + + + + + Contains settings used by . + + + + + .NET Core assembly executor. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Execute an assembly using arguments and settings. + + The assembly path. + The arguments. + The settings. + + + + .NET Core project packer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Pack the project using the specified path and settings. + + The target file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the directory in which to place temporary outputs. + + + + + Gets or sets the output directory. + + + + + Gets or sets the configuration under which to build. + + + + + Gets or sets the value that defines what `*` should be replaced with in version field in project.json. + + + + + Gets or sets a value indicating whether to not build project before packing. + + + + + Contains settings used by . + + + + + Gets or sets the directory in which to place temporary outputs. + + + + + Gets or sets the output directory. + + + + + Gets or sets the target runtime. + + + + + Gets or sets a specific framework to compile. + + + + + Gets or sets the configuration under which to build. + + + + + Gets or sets the value that defines what `*` should be replaced with in version field in project.json. + + + + + Gets or sets a value indicating whether to not build projects before publishing. + + + + + Gets or sets a value indicating whether to enable a temporary mechanism to include subdirectories + from native assets of dependency packages in output. + + + + + .NET Core project runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Publish the project using the specified path and settings. + + The target file path. + The settings. + + + + .NET Core project restorer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The cake log. + + + + Restore the project using the specified path and settings. + + List of projects and project folders to restore. Each value can be: a path to a project.json or global.json file, or a folder to recursively search for project.json files. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the specified NuGet package sources to use during the restore. + + + + + Gets or sets the NuGet configuration file to use. + + + + + Gets or sets the directory to install packages in. + + + + + Gets or sets a temporary option to allow NuGet to infer RIDs for legacy repositories. + + + + + Gets or sets the list of packages sources to use as a fallback. + + + + + Gets or sets a value indicating whether to display any output. + + + + + Gets or sets a value indicating whether to do not cache packages and http requests. + + + + + Gets or sets a value indicating whether to disable restoring multiple projects in parallel. + + + + + Gets or sets a value indicating whether to force the application to run using an invariant, English-based culture. + + + + + Gets or sets a value indicating whether to only warning failed sources if there are packages meeting version requirement. + + + + + Gets or sets the verbosity of logging to use. + + + + + Contains the verbosity of logging to use. Used by . + + + + + Error level. + + + + + Warning level. + + + + + Information level. + + + + + Verbose level. + + + + + Debug level. + + + + + Minimal level. + + + + + .NET Core project runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs the project using the specified path with arguments and settings. + + The target project path. + The arguments. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a specific framework to compile. + + + + + Gets or sets the configuration under which to build. + + + + + .NET Core project tester. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Tests the project using the specified path with arguments and settings. + + The target project path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the directory in which to place temporary outputs. + + + + + Gets or sets the output directory. + + + + + Gets or sets the target runtime. + + + + + Gets or sets the configuration under which to build. + + + + + Gets or sets specific framework to compile. + + + + + Gets or sets a value indicating whether to not build the project before testing. + + + + + Contains functionality related to ReSharper's dupFinder tool. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=JetBrains.ReSharper.CommandLineTools" + + + + + + + Analyses the specified file with ReSharper's DupFinder. + The file can either be a solution/project or a source file. + + The context. + The file to analyze. + + + DupFinder("./src/MySolution.sln"); + + + + + + Analyses the specified file with ReSharper's DupFinder using the specified settings. + The file can either be a solution/project or a source file. + + The context. + The file to analyze. + The settings. + + + var buildOutputDirectory = Directory("./.build"); + var resharperReportsDirectory = buildOutputDirectory + Directory("_ReSharperReports"); + var rootDirectoryPath = MakeAbsolute(Context.Environment.WorkingDirectory); + + DupFinder("./src/MySolution.sln", new DupFinderSettings { + ShowStats = true, + ShowText = true, + ExcludePattern = new String[] + { + rootDirectoryPath + "/**/*Designer.cs", + }, + OutputFile = resharperReportsDirectory + File("dupfinder-output.xml"), + ThrowExceptionOnFindingDuplicates = true + }); + + + + + + Analyses the specified projects with ReSharper's DupFinder. + The files can either be solutions and projects or a source files. + + The context. + The files to analyze. + + + var projects = GetFiles("./src/**/*.csproj"); + DupFinder(projects); + + + + + + Analyses the specified projects with ReSharper's DupFinder using the specified settings. + The files can either be solutions and projects or a source files. + + The context. + The files to analyze. + The settings. + + + var buildOutputDirectory = Directory("./.build"); + var resharperReportsDirectory = buildOutputDirectory + Directory("_ReSharperReports"); + var rootDirectoryPath = MakeAbsolute(Context.Environment.WorkingDirectory); + + var projects = GetFiles("./src/**/*.csproj"); + DupFinder(projects, new DupFinderSettings { + ShowStats = true, + ShowText = true, + ExcludePattern = new String[] + { + rootDirectoryPath + "/**/*Designer.cs", + }, + OutputFile = resharperReportsDirectory + File("dupfinder-output.xml"), + ThrowExceptionOnFindingDuplicates = true + }); + + + + + + Analyses all files matching the specified pattern with ReSharper's DupFinder. + + The context. + The pattern. + + + DupFinder("*.cs"); + + + + + + Analyses all files matching the specified pattern with ReSharper's DupFinder, + using the specified settings. + + The context. + The pattern. + The settings. + + + var buildOutputDirectory = Directory("./.build"); + var resharperReportsDirectory = buildOutputDirectory + Directory("_ReSharperReports"); + + DupFinder("*.cs", new DupFinderSettings { + OutputFile = resharperReportsDirectory + File("dupfinder-output.xml"), + }); + + + + + + Runs ReSharper's DupFinder using the provided config file. + + The context. + The config file. + + + DupFinderFromConfig("./src/dupfinder.config"); + + + + + + DupFinder runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The logger. + + + + Analyses the specified files using the specified settings. + + The file paths. + The settings. + + + + Runs ReSharper's DupFinder using the provided config file. + + The config file. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether the debug output should be enabled. + + + + + Gets or sets the complexity threshold for duplicate fragments. + Code fragment with lower complexity are discarded. + + + + + Gets or sets a value indicating whether to discard similar fields with different names. + + + + + Gets or sets a value indicating whether to discard similar lines of code with different literals. + + + + + Gets or sets a value indicating whether to discard similar local variables with different names. + + + + + Gets or sets a value indicating whether to discard similar types with different names. + + + + + Gets or sets a value indicating whether the process priority should be set to idle. + + + + + Gets or sets a list of keywords to exclude files that contain one of the keywords in their opening comments. + + + + + Gets or sets a list of keywords to exclude regions that contain one of the keywords in their message. + + + + + Gets or sets a lift of patterns which will be excluded from the analysis. + + + + + Gets or sets MsBuild properties. + + + + + Gets or sets a value indicating whether to normalize type names to the last subtype. + + + + + Gets or sets the directory where caches will be stored. + The default is %TEMP%. + + + + + Gets or sets the location DupFinder should write its output. + + The location DupFinder should write its output + + + + Gets or sets a value indicating whether to show CPU and memory usage statistics. + + + + + Gets or sets a value indicating whether to show duplicates text in the report. + + + + + Gets or sets a value indicating whether to throw an exception on finding duplicates + + + + + Contains functionality related to running Fixie tests. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=Fixie" + + + + + + + Runs all Fixie tests in the assemblies matching the specified pattern. + + + + Fixie("./src/UnitTests/*.dll"); + + + The context. + The pattern. + + + + Runs all Fixie tests in the assemblies matching the specified pattern, + using the specified settings. + + + + Fixie("./src/UnitTests/*.dll", new FixieSettings { + NUnitXml = TestResult.xml + }); + + + The context. + The pattern. + The settings. + + + + Runs all Fixie tests in the specified assemblies. + + + + var assemblies = new [] { + "UnitTests1.dll", + "UnitTests2.dll" + }; + Fixie(assemblies); + + + The context. + The assemblies. + + + + Runs all Fixie tests in the specified assemblies. + + + + var assemblies = GetFiles("./src/UnitTests/*.dll"); + Fixie(assemblies); + + + The context. + The assemblies. + + + + Runs all Fixie tests in the specified assemblies, + using the specified settings. + + + + var assemblies = new [] { + "UnitTests1.dll", + "UnitTests2.dll" + }; + Fixie(assemblies, new FixieSettings { + NUnitXml = TestResult.xml + }); + + + The context. + The assemblies. + The settings. + + + + Runs all Fixie tests in the specified assemblies, + using the specified settings. + + + + var assemblies = GetFiles("./src/UnitTests/*.dll"); + Fixie(assemblies, new FixieSettings { + NUnitXml = TestResult.xml + }); + + + The context. + The assemblies. + The settings. + + + + The Fixie test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The globber. + + + + Runs the tests in the specified assemblies, using the specified settings. + + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the file to be used to output NUnit style of XML results. + + + The name of the file to write NUnit style of results. + + + + + Gets or sets the file to be used to output xUnit style of XML results. + + + The name of the file to write xUnit style of results. + + + + + Gets or sets the the option to force TeamCity-formatted output on or off. + + + The value of TeamCity-formatted output. Either "on" or "off". + + + + + Gets the collection of Options as KeyValuePairs. + + + The collection of keys and values. + + + + + Contains functionality related to Fixie settings. + + + + + Adds an option to the settings. + + The settings. + The option name. + The option values. + The same instance so that multiple calls can be chained. + + + + Contains functionality related to GitLink. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=gitlink" + + + + + + + Update pdb files to link all sources. + This will allow anyone to step through the source code while debugging without a symbol source server. + + The context. + The Solution File to analyze. + + + GitLink("C:/temp/solution"); + + + + + + Update pdb files to link all sources, using specified settings. + This will allow anyone to step through the source code while debugging without a symbol source server. + + The context. + The path to the Root of the Repository to analyze. + The settings. + + + GitLink("C:/temp/solution", new GitLinkSettings { + RepositoryUrl = "http://mydomain.com", + Branch = "master", + ShaHash = "abcdef", + }); + + + + + + GitLink runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Update pdb files to link all sources. + + The path to the Root of the Repository to analyze. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the Url to remote git repository. + + + + + Gets or sets the Solution file name. + + + + + Gets or sets the name of the configuration. + + Default is Release + + + + Gets or sets the name of the platform. + + Default is AnyCPU + + + + Gets or sets the name of the branch to use on the remote repository. + + + + + Gets or sets the path to the GitLink log file. + + + + + Gets or sets the SHA-1 hash of the git commit to be used. + + + + + Gets or sets the directory where the PDB files are located. + + + + + Gets or sets a value indicating whether the Use PowerShell Command option should be enabled. + + + + + Gets or sets a value indicating whether the ErrorsAsWarnings option should be enabled. + + + + + Gets or sets a value indicating whether the Skip Verify option should be enabled. + + + + + Gets or sets a value indicating whether the debug output should be enabled. + + + + + GitVersion information + + + + + Gets or sets the major version. + + + + + Gets or sets the minor version. + + + + + Gets or sets the patch version. + + + + + Gets or sets the pre-release tag. + + + + + Gets or sets the pre-release tag with dash. + + + + + Gets or sets the pre-release label. + + + + + Gets or sets the pre-release number. + + + + + Gets or sets the build metadata. + + + + + Gets or sets the build metadata padded. + + + + + Gets or sets the major version. + + + + + Gets or sets the major, minor, and path. + + + + + Gets or sets the Semantic Version. + + + + + Gets or sets the legacy Semantic Version. + + + + + Gets or sets the padded legacy Semantic Version. + + + + + Gets or sets the assembly Semantic Version. + + + + + Gets or sets the full Semantic Version. + + + + + Gets or sets the informational version. + + + + + Gets or sets the branch name. + + + + + Gets or sets the git sha. + + + + + Gets or sets the nuget version for v2. + + + + + Gets or sets the nuget version. + + + + + Gets or sets the commits since version source + + + + + Gets or sets the commits since version source padded + + + + + Gets or sets the commit date + + + + + Contains functionality related to GitVersion. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=GitVersion.CommandLine" + + + + + + + Retrives the GitVersion output. + + The context. + The git version info. + + Update the assembly info files for the project. + Cake task: + + + { + GitVersion(new GitVersionSettings { + UpdateAssemblyInfo = true + }); + }); + ]]> + + Get the git version info for the project using a dynamic repository. + Cake task: + + + { + var result = GitVersion(new GitVersionSettings { + UserName = "MyUser", + Password = "MyPassword, + Url = "http://git.myhost.com/myproject.git" + Branch = "develop" + Commit = EnviromentVariable("MY_COMMIT") + }); + // Use result for building nuget packages, setting build server version, etc... + }); + ]]> + + + + + + Retrives the GitVersion output. + + The context. + The GitVersion settings. + The git version info. + + Update the assembly info files for the project. + Cake task: + + + { + GitVersion(new GitVersionSettings { + UpdateAssemblyInfo = true + }); + }); + ]]> + + Get the git version info for the project using a dynamic repository. + Cake task: + + + { + var result = GitVersion(new GitVersionSettings { + UserName = "MyUser", + Password = "MyPassword, + Url = "http://git.myhost.com/myproject.git" + Branch = "develop" + Commit = EnviromentVariable("MY_COMMIT") + }); + // Use result for building nuget packages, setting build server version, etc... + }); + ]]> + + + + + + The git version output type. + + + + + Outputs to the stdout using json. + + + + + Outputs to the stdout in a way usuable by a detected buildserver. + + + + + The GitVersion runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The log. + + + + Runs GitVersion and processes the results. + + The settings. + A task with the GitVersion results. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the path for the git repository to use. + + + + + Gets or sets the output type. + + + + + Gets or sets a value indicating whether to update all the assemblyinfo files. + + + + + Gets or sets whether to update all the assemblyinfo files. + + + + + Gets or sets whether to only show a specific variable. + + + + + Gets or sets the username for the target repository. + + + + + Gets or sets the password for the target repository. + + + + + Gets or sets the git url to use if using dynamic repositories. + + + + + Gets or sets the branch to use if using dynamic repositories. + + + + + Gets or sets the branch to use if using dynamic repositories. + + + + + Gets or sets a value indicating whether to fetch repository information from remote when calculating version. + + If your CI server clones the entire repository you can set this to 'true' to prevent GitVersion attempting any remote repository fetching + + + + Gets or sets the dynamic repository path. Defaults to %TEMP%. + + + + + Gets or sets the path to the log file. + + + + + Contains settings used by . + + + + + Gets or sets the path on which GitReleaseManager should be executed. + + + + + Gets or sets the path to the GitReleaseManager log file. + + + + + The GitReleaseManager Asset Adder used to add assets to a release. + + + + + Base class for all GitReleaseManager related tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a Release using the specified and settings. + + The user name. + The password. + The owner. + The repository. + The tag name. + The assets to upload. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the path on which GitReleaseManager should be executed. + + + + + Gets or sets the path to the GitReleaseManager log file. + + + + + The GitReleaseManager Milestone Closer used to close milestones. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a Release using the specified settings. + + The user name. + The password. + The owner. + The repository. + The milestone. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the milestone to be used when creating the release. + + + + + Gets or sets the name to be used when creating the release. + + + + + Gets or sets the location of a set of Release Notes to be used when creating the release. + + + + + Gets or sets a value indicating whether or not to create the release as a pre-release. + + + + + Gets or sets the Path(s) to the file(s) to include in the release. + + + + + Gets or sets the commit to tag. Can be a branch or SHA. Defaults to repository's default branch.. + + + + + Gets or sets the path on which GitReleaseManager should be executed. + + + + + Gets or sets the path to the GitReleaseManager log file. + + + + + The GitReleaseManager Release Creator used to create releases. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a Release using the specified and settings. + + The user name. + The password. + The owner. + The repository. + The settings. + + + + The GitReleaseManager Release Publisher used to publish releases. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a Release using the specified and settings. + + The user name. + The password. + The owner. + The repository. + The output path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the tag name to be used when exporting the release notes. + + + + + Gets or sets the path on which GitReleaseManager should be executed. + + + + + Gets or sets the path to the GitReleaseManager log file. + + + + + Contains functionality related to GitReleaseManager. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the appropriate settings class: + + #tool "nuget:?package=gitreleasemanager" + + + + + + + Creates a Package Release. + + The context. + The user name. + The password. + The owner. + The repository. + + + GitReleaseManagerCreate("user", "password", "owner", "repo"); + + + + + GitReleaseManagerCreate("user", "password", "owner", "repo"); + + + + + + Creates a Package Release using the specified settings. + + The context. + The user name. + The password. + The owner. + The repository. + The settings. + + + GitReleaseManagerCreate("user", "password", "owner", "repo", new GitReleaseManagerCreateSettings { + Milestone = "0.1.0", + Prerelease = false, + Assets = "c:/temp/asset1.txt,c:/temp/asset2.txt", + TargetCommitish = "master", + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + GitReleaseManagerCreate("user", "password", "owner", "repo", new GitReleaseManagerCreateSettings { + Name = "0.1.0", + InputFilePath = "c:/repo/releasenotes.md", + Prerelease = false, + Assets = "c:/temp/asset1.txt,c:/temp/asset2.txt", + TargetCommitish = "master", + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + + Add Assets to an existing release. + + The context. + The user name. + The password. + The owner. + The repository. + The tag name. + The assets. + + + GitReleaseManagerAddAssets("user", "password", "owner", "repo", "0.1.0", "c:/temp/asset1.txt,c:/temp/asset2.txt"); + + + + + + Add Assets to an existing release using the specified settings. + + The context. + The user name. + The password. + The owner. + The repository. + The tag name. + The assets. + The settings. + + + GitReleaseManagerAddAssets("user", "password", "owner", "repo", "0.1.0", "c:/temp/asset1.txt,c:/temp/asset2.txt" new GitReleaseManagerAddAssetsSettings { + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + + Closes the milestone associated with a release. + + The context. + The user name. + The password. + The owner. + The repository. + The milestone. + + + GitReleaseManagerClose("user", "password", "owner", "repo", "0.1.0"); + + + + + + Closes the milestone associated with a release using the specified settings. + + The context. + The user name. + The password. + The owner. + The repository. + The milestone. + The settings. + + + GitReleaseManagerClose("user", "password", "owner", "repo", "0.1.0", new GitReleaseManagerCloseMilestoneSettings { + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + + Publishes the release. + + The context. + The user name. + The password. + The owner. + The repository. + The tag name. + + + GitReleaseManagerPublish("user", "password", "owner", "repo", "0.1.0"); + + + + + + Publishes the release using the specified settings. + + The context. + The user name. + The password. + The owner. + The repository. + The tag name. + The settings. + + + GitReleaseManagerPublish("user", "password", "owner", "repo", "0.1.0", new GitReleaseManagerPublishSettings { + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + + Exports the release notes. + + The context. + The user name. + The password. + The owner. + The repository. + The output file path. + + + GitReleaseManagerExport("user", "password", "owner", "repo", "c:/temp/releasenotes.md") + }); + + + + + + Exports the release notes using the specified settings. + + The context. + The user name. + The password. + The owner. + The repository. + The output file path. + The settings. + + + GitReleaseManagerExport("user", "password", "owner", "repo", "c:/temp/releasenotes.md", new GitReleaseManagerExportSettings { + TagName = "0.1.0", + TargetDirectory = "c:/repo", + LogFilePath = "c:/temp/grm.log" + }); + + + + + + The GitReleaseManager Release Publisher used to publish releases. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a Release using the specified and settings. + + The user name. + The password. + The owner. + The repository. + The tag name. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the path on which GitReleaseManager should be executed. + + + + + Gets or sets the path to the GitReleaseManager log file. + + + + + Contains functionality related to GitReleaseNotes. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=GitReleaseNotes" + + + + + + + Generates a set of release notes based on the commit history of the repository and specified settings. + + The context. + The output file. + The settings. + + + GitReleaseNotes("c:/temp/releasenotes.md", new GitReleaseNotesSettings { + WorkingDirectory = "c:/temp", + Verbose = true, + IssueTracker = IssueTracker.GitHub, + AllTags = true, + RepoUserName = "bob", + RepoPassword = "password", + RepoUrl = "http://myrepo.co.uk", + RepoBranch = "master", + IssueTrackerUrl = "http://myissuetracker.co.uk", + IssueTrackerUserName = "bob", + IssueTrackerPassword = "password", + IssueTrackerProjectId = "1234", + Categories = "Category1", + Version = "1.2.3.4", + AllLabels = true + }); + + + + + + The GitReleaseNotes runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs GitVersion and processes the results. + + The output file. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether verbose logging is used. + + + + + Gets or sets the IssueTracker to use. + + + + + Gets or sets a value indicating whether all tags should be included in the releasenotes. + + If not specified then only the issues since that last tag are included. + + + + Gets or sets the username to use when accessing repository. + + + + + Gets or sets the password to use when accessing repository. + + + + + Gets or sets the token to use when accessing repository. + + To be used instead of username/password + + + + Gets or sets the Url to use when accessing repository. + + To be used instead of username/password + + + + Gets or sets the branch name to checkout any existing release notes file. + + To be used instead of username/password + + + + Gets or sets the Url to the Issue Tracker. + + To be used instead of username/password + + + + Gets or sets the username to use when accessing issue tracker. + + + + + Gets or sets the password to use when accessing issue tracker. + + + + + Gets or sets the token to use when accessing issue tracker. + + To be used instead of username/password + + + + Gets or sets the Project Id to use when accessing issue tracker. + + + + + Gets or sets the Jql query for closed issues you would like included if mentioned. + + + + + Gets or sets a value which allows additional labels to be treated as categories. + + + + + Gets or sets a value which specifies the version to publish. + + + + + Gets or sets a value indicating whether all labels should be included in the releasenotes. + + If not specified then only the defaults (bug, enhancement, feature) are included. + + + + The IssueTracker to be used. + + + + + Uses BitBucket as Issue Tracker. + + + + + Uses GitHub as Issue Tracker. + + + + + Uses Jira as Issue Tracker. + + + + + Uses YouTrack as Issue Tracker. + + + + + Contains functionality related to ILMerge. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=ilmerge" + + + + + + + Merges the specified assemblies. + + The context. + The output file. + The primary assembly. + The assembly paths. + + + var assemblyPaths = GetFiles("./**/Cake.*.dll"); + ILMerge("./MergedCake.exe", "./Cake.exe", assemblyPaths); + + + + + + Merges the specified assemblies. + + The context. + The output file. + The primary assembly. + The assembly paths. + The settings. + + + var assemblyPaths = GetFiles("./**/Cake.*.dll"); + ILMerge( + "./MergedCake.exe", + "./Cake.exe", + assemblyPaths, + new ILMergeSettings { Internalize = true }); + + + + + + The ILMerge runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Merges the specified assemblies. + + The output assembly path. + The primary assembly path. + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the name of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether whether types in assemblies other + than the primary assembly should have their visibility modified to internal. + + + true if types in assemblies other than the primary assembly should + have their visibility modified to internal; otherwise, false. + + + + + Gets or sets the target kind. + + The target kind. + + + + Gets or sets the target platform. + + The target platform. + + + + Represents an ILMerge target. + + + + + TargetKind: Default + + + + + TargetKind: Dynamic Link Library + + + + + TargetKind: Executable + + + + + TargetKind: Windows executable + + + + + Contains functionality related to arguments. + + + + + Determines whether or not the specified argument exist. + + The context. + The argument name. + Whether or not the specified argument exist. + + This sample shows how to call the method. + + var argumentName = "myArgument"; + //Cake.exe .\hasargument.cake -myArgument="is specified" + if (HasArgument(argumentName)) + { + Information("{0} is specified", argumentName); + } + //Cake.exe .\hasargument.cake + else + { + Warning("{0} not specified", argumentName); + } + + + + + + Gets an argument and throws if the argument is missing. + + The argument type. + The context. + The argument name. + The value of the argument. + + + //Cake.exe .\argument.cake -myArgument="is valid" -loopCount = 5 + Information("Argument {0}", Argument<string>("myArgument")); + var loopCount = Argument<int>("loopCount"); + for(var index = 0;index<loopCount; index++) + { + Information("Index {0}", index); + } + + + Argument value is null. + is null. + + + + Gets an argument and returns the provided if the argument is missing. + + The argument type. + The context. + The argument name. + The value to return if the argument is missing. + The value of the argument if it exist; otherwise . + + + //Cake.exe .\argument.cake -myArgument="is valid" -loopCount = 5 + Information("Argument {0}", Argument<string>("myArgument", "is NOT valid")); + var loopCount = Argument<int>("loopCount", 10); + for(var index = 0;index<loopCount; index++) + { + Information("Index {0}", index); + } + + + + + + Contains functionality related to compress files to Zip. + + + + + Zips the specified directory. + + The context. + The root path. + The output path. + + + Zip("./publish", "publish.zip"); + + + + + + Zips the files matching the specified pattern. + + The context. + The root path. + The output path. + The pattern. + + + Zip("./", "xmlfiles.zip", "./*.xml"); + + + + + + Zips the specified files. + + The context. + The root path. + The output path. + The file paths. + + + var files = GetFiles("./**/Cake.*.dll"); + Zip("./", "cakeassemblies.zip", files); + + + + + + Zips the specified files. + + The context. + The root path. + The output path. + The file paths. + + + var files = new [] { + "./src/Cake/bin/Debug/Autofac.dll", + "./src/Cake/bin/Debug/Cake.Common.dll", + "./src/Cake/bin/Debug/Cake.Core.dll", + "./src/Cake/bin/Debug/Cake.exe" + }; + Zip("./", "cakebinaries.zip", files); + + + + + + Unzips the specified file + + The context. + Zip file to unzip. + Output path to unzip into. + + + Unzip("Cake.zip", "./cake"); + + + + + + Performs Zip compression. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The log. + + + + Zips the specified directory. + + The root path. + The output path. + The files to zip. + + + + Unzips the specified file to the specified output path + + Zip file path. + Output directory path. + + + + Contains extension methods for working with directories. + + + + + Gets a directory path from string. + + + + // Get the temp directory. + var root = Directory("./"); + var temp = root + Directory("temp"); + + // Clean the directory. + CleanDirectory(temp); + + + The context. + The path. + A directory path. + + + + Deletes the specified directories. + + + + var directoriesToDelete = new DirectoryPath[]{ + Directory("be"), + Directory("gone") + }; + DeleteDirectories(directoriesToDelete, recursive:true); + + + The context. + The directory paths. + Will perform a recursive delete if set to true. + + + + Deletes the specified directories. + + + + var directoriesToDelete = new []{ + "be", + "gone" + }; + DeleteDirectories(directoriesToDelete, recursive:true); + + + The context. + The directory paths. + Will perform a recursive delete if set to true. + + + + Deletes the specified directory. + + + + DeleteDirectory("./be/gone", recursive:true); + + + The context. + The directory path. + Will perform a recursive delete if set to true. + + + + Cleans the directories matching the specified pattern. + Cleaning the directory will remove all it's content but not the directory itself. + + + + CleanDirectories("./src/**/bin/debug"); + + + The context. + The pattern to match. + + + + Cleans the directories matching the specified pattern. + Cleaning the directory will remove all it's content but not the directory itself. + + + + Func<IFileSystemInfo, bool> exclude_node_modules = + fileSystemInfo=>!fileSystemInfo.Path.FullPath.EndsWith( + "node_modules", + StringComparison.OrdinalIgnoreCase); + CleanDirectories("./src/**/bin/debug", exclude_node_modules); + + + The context. + The pattern to match. + The predicate used to filter directories based on file system information. + + + + Cleans the specified directories. + Cleaning a directory will remove all it's content but not the directory itself. + + + + var directoriesToClean = GetDirectories("./src/**/bin/"); + CleanDirectories(directoriesToClean); + + + The context. + The directory paths. + + + + Cleans the specified directories. + Cleaning a directory will remove all it's content but not the directory itself. + + + + var directoriesToClean = new []{ + "./src/Cake/obj", + "./src/Cake.Common/obj" + }; + CleanDirectories(directoriesToClean); + + + The context. + The directory paths. + + + + Cleans the specified directory. + + + + CleanDirectory("./src/Cake.Common/obj"); + + + The context. + The directory path. + + + + Cleans the specified directory. + + + + CleanDirectory("./src/Cake.Common/obj", fileSystemInfo=>!fileSystemInfo.Hidden); + + + The context. + The directory path. + Predicate used to determine which files/directories should get deleted. + + + + Creates the specified directory. + + + + CreateDirectory("publish"); + + + The context. + The directory path. + + + + Creates the specified directory if it does not exist. + + + + EnsureDirectoryExists("publish"); + + + The context. + The directory path. + + + + Copies the contents of a directory, including subdirectories to the specified location. + + + + CopyDirectory("source_path", "destination_path"); + + + The context. + The source directory path. + The destination directory path. + + + + Determines whether the given path refers to an existing directory. + + + + var dir = "publish"; + if (!DirectoryExists(dir)) + { + CreateDirectory(dir); + } + + + The context. + The to check. + true if refers to an existing directory; + false if the directory does not exist or an error occurs when trying to + determine if the specified path exists. + + + + Makes the path absolute (if relative) using the current working directory. + + + + var path = MakeAbsolute(Directory("./resources")); + + + The context. + The path. + An absolute directory path. + + + + Contains functionality related to file operations. + + + + + Gets a file path from string. + + + + // Get the temp file. + var root = Directory("./"); + var temp = root + File("temp"); + + // Delete the file. + CleanDirectory(temp); + + + The context. + The path. + A file path. + + + + Copies an existing file to a new location. + + The context. + The file path. + The target directory path. + + + CopyFileToDirectory("test.txt", "./targetdir"); + + + + + + Copies an existing file to a new file, providing the option to specify a new file name. + + The context. + The file path. + The target file path. + + + CopyFile("test.tmp", "test.txt"); + + + + + + Copies all files matching the provided pattern to a new location. + + The context. + The pattern. + The target directory path. + + + CopyFiles("Cake.*", "./publish"); + + + + + + Copies existing files to a new location. + + The context. + The file paths. + The target directory path. + + + var files = GetFiles("./**/Cake.*"); + CopyFiles(files, "destination"); + + + + + + Copies existing files to a new location. + + The context. + The file paths. + The target directory path. + + + CreateDirectory("destination"); + var files = new [] { + "Cake.exe", + "Cake.pdb" + }; + CopyFiles(files, "destination"); + + + + + + Moves an existing file to a new location. + + The context. + The file path. + The target directory path. + + + MoveFileToDirectory("test.txt", "./targetdir"); + + + + + + Moves existing files matching the specified pattern to a new location. + + The context. + The pattern. + The target directory path. + + + MoveFiles("./publish/Cake.*", "./destination"); + + + + + + Moves existing files to a new location. + + The context. + The file paths. + The target directory path. + + + var files = GetFiles("./publish/Cake.*"); + MoveFiles(files, "destination"); + + + + + + Moves an existing file to a new location, providing the option to specify a new file name. + + The context. + The file path. + The target file path. + + + MoveFile("test.tmp", "test.txt"); + + + + + + Deletes the specified files. + + The context. + The pattern. + + + DeleteFiles("./publish/Cake.*"); + + + + + + Deletes the specified files. + + The context. + The file paths. + + + var files = GetFiles("./destination/Cake.*"); + DeleteFiles(files); + + + + + + Deletes the specified file. + + The context. + The file path. + + + DeleteFile("deleteme.txt"); + + + + + + Determines whether the given path refers to an existing file. + + The context. + The to check. + true if refers to an existing file; + false if the file does not exist or an error occurs when trying to + determine if the specified file exists. + + + if (FileExists("findme.txt")) + { + Information("File exists!"); + } + + + + + + Makes the path absolute (if relative) using the current working directory. + + The context. + The path. + An absolute file path. + + + var path = MakeAbsolute(File("./resources")); + + + + + + Gets the size of a file in bytes. + + The context. + The path. + Size of file in bytes or -1 if file doesn't exist. + + + Information("File size: {0}", FileSize("./build.cake")); + + + + + + Contains functionality related to file system globbing. + + + + + Gets all files matching the specified pattern. + + + + var files = GetFiles("./**/Cake.*.dll"); + foreach(var file in files) + { + Information("File: {0}", file); + } + + + The context. + The glob pattern to match. + A . + + + + Gets all files matching the specified pattern. + + + + Func<IFileSystemInfo, bool> exclude_node_modules = + fileSystemInfo => !fileSystemInfo.Path.FullPath.EndsWith( + "node_modules", StringComparison.OrdinalIgnoreCase); + + var files = GetFiles("./**/Cake.*.dll", exclude_node_modules); + foreach(var file in files) + { + Information("File: {0}", file); + } + + + The context. + The glob pattern to match. + The predicate used to filter directories based on file system information. + A . + + + + Gets all directory matching the specified pattern. + + + + var directories = GetDirectories("./src/**/obj/*"); + foreach(var directory in directories) + { + Information("Directory: {0}", directory); + } + + + The context. + The glob pattern to match. + A . + + + + Gets all directory matching the specified pattern. + + + + Func<IFileSystemInfo, bool> exclude_node_modules = + fileSystemInfo => !fileSystemInfo.Path.FullPath.EndsWith( + "node_modules", StringComparison.OrdinalIgnoreCase); + + var directories = GetDirectories("./src/**/obj/*", exclude_node_modules); + foreach(var directory in directories) + { + Information("Directory: {0}", directory); + } + + + The context. + The glob pattern to match. + The predicate used to filter directories based on file system information. + A . + + + + Represents a target platform. + + + + + Initializes a new instance of the class. + + The .NET framework target version. + + + + Initializes a new instance of the class. + + The .NET framework target version. + The directory where mscorlib.dll can be found. + + + + Gets the .NET framework target version. + + + + + Gets the directory where mscorlib.dll can be found. + + + + + Represents the .NET Framework for the target assembly + + + + + NET Framework v1 + + + + + NET Framework v1.1 + + + + + NET Framework v2 + + + + + NET Framework v4 + + + + + Contains functionality related to ReSharper's InspectCode tool. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=JetBrains.ReSharper.CommandLineTools" + + + + + + + Analyses the specified solution with Resharper's InspectCode. + + The context. + The solution. + + + InspectCode("./src/MySolution.sln"); + + + + + + Analyses the specified solution with Resharper's InspectCode, + using the specified settings. + + The context. + The solution. + The settings. + + + var buildOutputDirectory = Directory("./.build"); + var resharperReportsDirectory = buildOutputDirectory + Directory("_ReSharperReports"); + + var msBuildProperties = new Dictionary<string, string>(); + msBuildProperties.Add("configuration", configuration); + msBuildProperties.Add("platform", "AnyCPU"); + + InspectCode("./MySolution.sln", new InspectCodeSettings { + SolutionWideAnalysis = true, + Profile = "./MySolution.sln.DotSettings", + MsBuildProperties = msBuildProperties, + OutputFile = resharperReportsDirectory + File("inspectcode-output.xml"), + ThrowExceptionOnFindingViolations = true + }); + + + + + + Runs ReSharper's InspectCode using the specified config file. + + The context. + The config file. + + + InspectCodeFromConfig("./src/inspectcode.config"); + + + + + + InspectCode runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The logger. + + + + Analyses the specified solution, using the specified settings. + + The solution. + The settings. + + + + Runs ReSharper's InspectCode using the provided config file. + + The config file. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the location InspectCode should write its output. + + The location that InspectCode should write its output + + + + Gets or sets a value indicating whether enable solution-wide analysis should be forced. + Default value is false. + + + true if solution-wide analysis should be enabled by force; otherwise, fault. + + + + + Gets or sets a value indicating whether disable solution-wide analysis should be forced. + Default value is false + + + true if solution-wide analysis should be disabled by force; otherwise, fault. + + + + + Gets or sets a filter to analyze only particular project(s) instead of the whole solution. + Supports wildcards. + + The filter to analyze only particular projects(s). + + + + Gets or sets MSBuild properties. + + The MSBuild properties to override + + + + Gets or sets a list of Resharper extensions which will be used. + + + + + Gets or sets the directory where caches will be stored. + The default is %TEMP%. + + The directory where caches will be stored. + + + + Gets or sets a value indicating whether the debug output should be enabled. + + + true if the debug output should be enabled; otherwise, false. + + + + + Gets or sets a value indicating whether all global, solution and project settings should be ignored. + Alias for disabling the settings layers GlobalAll, GlobalPerProduct, SolutionShared, SolutionPersonal, ProjectShared and ProjectPersonal. + + + + + Gets or sets a list of InspectCodeSettings which will be disabled. + + + + + Gets or sets the path to the file to use custom settings from. + + + + + Gets or sets a value indicating whether to throw an exception on finding violations + + + + + Represents Resharper's settings layers. + + + + + SettingsLayer: GlobalAll. + + + + + SettingsLayer: GlobalPerProduct. + + + + + SettingsLayer: SolutionShared. This layer is saved in %SolutionName%.sln.DotSettings + + + + + SettingsLayer: SolutionPersonal. This layer is saved in %SolutionName%.sln.DotSettings.user. + + + + + SettingsLayer: ProjectShared. This layer is saved in %ProjectName%.csproj.DotSettings. + + + + + SettingsLayer: ProjectPersonal. This layer is saved in %ProjectName%.csproj.DotSettings.user. + + + + + Contains functionality related to .NET build settings. + + + + + Adds a .NET build target to the configuration. + + The settings. + The .NET build target. + The same instance so that multiple calls can be chained. + + + + Adds a property to the configuration. + + The settings. + The property name. + The property values. + The same instance so that multiple calls can be chained. + + + + Sets the configuration. + + The settings. + The configuration. + The same instance so that multiple calls can be chained. + + + + Sets the build log verbosity. + + The settings. + The build log verbosity. + The same instance so that multiple calls can be chained. + + + + Contains functionality related to MSBuild. + + In order to use the commands for this alias, MSBuild will already have to be installed on the machine the Cake Script + is being executed. + + + + + + Builds the specified solution using MSBuild. + + The context. + The solution. + + + MSBuild("./src/Cake.sln"); + + + + + + Builds the specified solution using MSBuild. + + The context. + The solution to build. + The settings configurator. + + + MSBuild("./src/Cake.sln", configurator => + configurator.SetConfiguration("Debug") + .SetVerbosity(Verbosity.Minimal) + .UseToolVersion(MSBuildToolVersion.VS2015) + .SetMSBuildPlatform(MSBuildPlatform.x86) + .SetPlatformTarget(PlatformTarget.MSIL)); + + + + + + Builds the specified solution using MSBuild. + + The context. + The solution to build. + The settings. + + + MSBuild("./src/Cake.sln", new MSBuildSettings { + Verbosity = Verbosity.Minimal, + ToolVersion = MSBuildToolVersion.VS2015, + Configuration = "Release", + PlatformTarget = PlatformTarget.MSIL + }); + + + + + + The MSBuild runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The runner. + The tool locator. + + + + Runs MSBuild with the specified settings. + + The solution to build. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets the targets. + + The targets. + + + + Gets the properties. + + The properties. + + + + Gets or sets the platform target. + + The platform target. + + + + Gets or sets the MSBuild platform. + + The MSBuild platform. + + + + Gets or sets the tool version. + + The tool version. + + + + Gets or sets the configuration. + + The configuration. + + + + Gets or sets the maximum CPU count. + If this value is zero, MSBuild will use as many processes as + there are available CPUs to build the project. + + The maximum CPU count. + + + + Gets or sets whether or not node reuse is used. + When you’re doing multiple builds in a row, this helps reduce your total build time, + by avoiding the start up costs of each MSBuild child node. + + + + + Gets or sets the amount of information to display in the build log. + Each logger displays events based on the verbosity level that you set for that logger. + + The build log verbosity. + + + + Contains functionality related to MSBuild settings. + + + + + Adds a MSBuild target to the configuration. + + The settings. + The MSBuild target. + The same instance so that multiple calls can be chained. + + + + Sets the tool version. + + The settings. + The version. + The same instance so that multiple calls can be chained. + + + + Sets the platform target. + + The settings. + The target. + The same instance so that multiple calls can be chained. + + + + Sets the MSBuild platform. + + The settings. + The platform. + The same instance so that multiple calls can be chained. + + + + Adds a property to the configuration. + + The settings. + The property name. + The property values. + The same instance so that multiple calls can be chained. + + + + Sets the configuration. + + The settings. + The configuration. + The same instance so that multiple calls can be chained. + + + + Sets the maximum CPU count. + + The settings. + The maximum CPU count. Set this value to zero to use as many MSBuild processes as available CPUs. + The same instance so that multiple calls can be chained. + + + + Sets whether or not node reuse should be enabled. + + The settings. + true if node reuse should be enabled; otherwise false. + The same instance so that multiple calls can be chained. + + + + Sets the build log verbosity. + + The settings. + The build log verbosity. + The same instance so that multiple calls can be chained. + + + + Represents a MSBuild tool version. + + + + + The highest available MSBuild tool version. + + + + + MSBuild tool version: .NET 2.0 + + + + + MSBuild tool version: .NET 3.0 + + + + + MSBuild tool version: Visual Studio 2005 + + + + + MSBuild tool version: .NET 3.5 + + + + + MSBuild tool version: Visual Studio 2008 + + + + + MSBuild tool version: .NET 4.0 + + + + + MSBuild tool version: .NET 4.5 + + + + + MSBuild tool version: Visual Studio 2010 + + + + + MSBuild tool version: Visual Studio 2011 + + + + + MSBuild tool version: Visual Studio 2012 + + + + + MSBuild tool version: .NET 4.5.1 + + + + + MSBuild tool version: .NET 4.5.2 + + + + + MSBuild tool version: Visual Studio 2013 + + + + + MSBuild tool version: Visual Studio 2015 + + + + + MSBuild tool version: .NET 4.6 + + + + + Represents an MSBuild exe platform. + + + + + Will build using MSBuild version based on PlatformTarget/Host OS. + + + + + MSBuildPlatform: x86 + + + + + MSBuildPlatform: x64 + + + + + Represents a MSBuild platform target. + + + + + Platform target: MSIL (Any CPU) + + + + + Platform target: x86 + + + + + Platform target: x64 + + + + + Platform target: ARM + + + + + Platform target: Win32 + + + + + Contains functionality related to running MSTest unit tests. + + In order to use the commands for this alias, MSTest will need to be installed on the machine where + the Cake script is being executed. This is typically achieved by having either Visual Studio installed, or by + using the Micrsoft Build Tools, for example, for 2015. + + + + + + Runs all MSTest unit tests in the assemblies matching the specified pattern. + + + + MSTest("./Tests/*.UnitTests.dll"); + + + The context. + The pattern. + + + + Runs all MSTest unit tests in the assemblies matching the specified pattern. + + + + MSTest("./Tests/*.UnitTests.dll", new MSTestSettings() { NoIsolation = false }); + + + The context. + The pattern. + The settings. + + + + Runs all MSTest unit tests in the specified assemblies. + + + + var paths = new List<FilePath>() { "./assemblydir1", "./assemblydir2" }; + MSTest(paths); + + + The context. + The assembly paths. + + + + Runs all MSTest unit tests in the specified assemblies. + + + + var paths = new List<FilePath>() { "./assemblydir1", "./assemblydir2" }; + MSTest(paths, new MSTestSettings() { NoIsolation = false }); + + + The context. + The assembly paths. + The settings. + + + + The MSTest unit test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs the tests in the specified assembly. + + The assembly path. + The settings. + + + + Gets the name of the tool. + + The tool name. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to run tests within the MSTest process. + This choice improves test run speed but increases risk to the MSTest.exe process. + Defaults to true. + + + true if running without isolation; otherwise, false. + + + + + Gets or sets a value indicating the test category filter string to pass to + MSTest.exe flag /testcategory. + + + + + Gets or sets the filepath for a named resulting test file. + MSTest.exe flag /resultsfile. + + + + + Gets or sets the test settings file to pass to MSTest.exe flag /testsettings. + + + + + The runner which executes NSIS. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs makensis.exe with the specified script files and settings. + + The script file (.nsi) to compile. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by the . + + + + + Gets or sets the script compiler defines. + + + + + Gets or sets a value indicating whether to disable current directory change to that of the script file. + + + + + Gets or sets a value indicating whether to disable inclusion of the nsisconf.nsh file. + + + + + Contains functionality related to NSIS. + + In order to use the commands for this alias, NSIS will need to be installed on the machine where + the Cake script is being executed. See this page for information + on how to download/install. + + + + + + Compiles the given NSIS script using the default settings. + + The context. + The path to the .nsi script file to compile. + + + MakeNSIS("./src/Cake.nsi"); + + + + + + Compiles the given NSIS script using the given . + + The context. + The path to the .nsi script file to compile. + The to use. + + + MakeNSIS("./src/Cake.nsi", new MakeNSISSettings { + NoConfig = true + }); + + + + + + The NuGet package installer used to install NuGet packages. + + + + + Base class for all NuGet related tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + + + + Installs NuGet packages using the specified package configuration file and settings. + + Path to package configuration to use for install. + The settings. + + + + Installs NuGet packages using the specified package id and settings. + + The source package id. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the directory in which packages will be installed. + If none is specified, the current directory will be used. + + + + + Gets or sets the version of the package to install. + If none specified, the latest will be used. + + + + + Gets or sets a value indicating whether to exclude the version number from the package folder. + + + true if to exclude the version number from the package folder; otherwise, false. + + + + + Gets or sets a value indicating whether to allow installation of prerelease packages. + This flag is not required when restoring packages by installing from packages.config. + + + true to allow installation of prerelease packages; otherwise, false. + + + + + Gets or sets a value indicating whether to check if package + install consent is granted before installing a package. + + + true if to check if package install consent is granted before installing a package; otherwise, false. + + + + + Gets or sets the solution directory path for package restore. + + + The solution directory path. + + + + + Gets or sets a list of packages sources to use for this command. + + The list of packages sources to use for this command. + + + + Gets or sets a value indicating whether or not to use the machine cache as the first package source. + + + true to not use the machine cache as the first package source; otherwise, false. + + + + + Gets or sets a value indicating whether to disable parallel processing of packages for this command. + Disable parallel processing of packages for this command. + + + true to disable parallel processing of packages for this command; otherwise, false. + + + + + Gets or sets the output verbosity. + + The output verbosity. + + + + Gets or sets the NuGet configuration file. + If not specified, the file %AppData%\NuGet\NuGet.config is used as the configuration file. + + The NuGet configuration file. + + + + Gets or sets a list of packages sources to use as fallbacks for this command. + This setting requires NuGet V3 or later. + + The list of packages sources to use as fallbacks for this command. + + + + NuGet MSBuild version + + + + + MSBuildVersion : 4 + + + + + MSBuildVersion : 12 + + + + + MSBuildVersion : 14 + + + + + Represents a NuGet nuspec file + + + + + Gets or sets the location of the file or files to include. + The path is relative to the NuSpec file unless an absolute path is specified. + The wildcard character - * - is allowed. + Using a double wildcard - ** implies a recursive directory search. + + + + + Gets or sets the relative path to the directory within the package where the source files will be placed. + + + + + Gets or sets the file or files to exclude. + This is usually combined with a wildcard value in the src attribute. + The exclude attribute can contain a semi-colon delimited list of files or a file pattern. + Using a double wildcard - ** - implies a recursive exclude pattern. + + + + + Represents a NuGet nuspec dependency + + + + + Gets or sets the dependency's package ID. + + The dependency's package ID. + + + + Gets or sets the dependency's version. + + The dependency's version. + + + + The NuGet set API key used to set API key used for API/feed authentication. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + + + + Installs NuGet packages using the specified package id and settings. + + The API key. + The Server URL where the API key is valid. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the output verbosity. + + The output verbosity. + + + + Gets or sets the NuGet configuration file. + If not specified, the file %AppData%\NuGet\NuGet.config is used as the configuration file. + + The NuGet configuration file. + + + + The NuGet set command used to set the proxy settings to be used while connecting to your NuGet feed. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + + + + Set the proxy settings to be used while connecting to your NuGet feed. + + The url of the proxy. + The username used to access the proxy. + The password used to access the proxy. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the output verbosity. + + The output verbosity. + + + + Gets or sets the NuGet configuration file. + If not specified, the file %AppData%\NuGet\NuGet.config is used as the configuration file. + + The NuGet configuration file. + + + + The NuGet sources is used to work with user config feeds & credentials + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + + + + Adds NuGet package source using the specified settings to global user config + + Name of the source. + Path to the package(s) source. + The settings. + + + + Remove specified NuGet package source + + Name of the source. + Path to the package(s) source. + The settings. + + + + Determines whether the specified NuGet package source exist. + + Path to the package(s) source. + The settings. + Whether the specified NuGet package source exist. + + + + Contains settings used by . + + + + + Gets or sets the (optional) user name. + + Optional user name to be used when connecting to an authenticated source. + + + + Gets or sets the (optional) password. + + Optional password to be used when connecting to an authenticated source. + + + + Gets or sets the output verbosity. + + The output verbosity. + + + + Gets or sets a value indicating whether this source contains sensitive data, i.e. authentication token in url. + + + true if this source contains sensitive data; otherwise, false. + + + + + Gets or sets a value indicating whether to not encrypt the password and store it in clear text. (Default: false) + + + true if password is stored as unencrypted; otherwise, false. + + + + + Contains functionality for working with NuGet. + + + Since Cake requires NuGet to be available very early in the build pipeline, we recommend that NuGet is made + available via the Cake BootStrapper. + + + + + Creates a NuGet package using the specified Nuspec or project file. + + The context. + The nuspec or project file path. + The settings. + + + var nuGetPackSettings = new NuGetPackSettings { + Id = "TestNuget", + Version = "0.0.0.1", + Title = "The tile of the package", + Authors = new[] {"John Doe"}, + Owners = new[] {"Contoso"}, + Description = "The description of the package", + Summary = "Excellent summary of what the package does", + ProjectUrl = new Uri("https://github.com/SomeUser/TestNuget/"), + IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestNuget/master/icons/testnuget.png"), + LicenseUrl = new Uri("https://github.com/SomeUser/TestNuget/blob/master/LICENSE.md"), + Copyright = "Some company 2015", + ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"}, + Tags = new [] {"Cake", "Script", "Build"}, + RequireLicenseAcceptance= false, + Symbols = false, + NoPackageAnalysis = true, + Files = new [] { + new NuSpecContent {Source = "bin/TestNuget.dll", Target = "bin"}, + }, + BasePath = "./src/TestNuget/bin/release", + OutputDirectory = "./nuget" + }; + + NuGetPack("./nuspec/TestNuget.nuspec", nuGetPackSettings); + + + + + + Creates NuGet packages using the specified Nuspec or project files. + + The context. + The nuspec or project file paths. + The settings. + + + var nuGetPackSettings = new NuGetPackSettings { + Id = "TestNuget", + Version = "0.0.0.1", + Title = "The tile of the package", + Authors = new[] {"John Doe"}, + Owners = new[] {"Contoso"}, + Description = "The description of the package", + Summary = "Excellent summary of what the package does", + ProjectUrl = new Uri("https://github.com/SomeUser/TestNuget/"), + IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestNuget/master/icons/testnuget.png"), + LicenseUrl = new Uri("https://github.com/SomeUser/TestNuget/blob/master/LICENSE.md"), + Copyright = "Some company 2015", + ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"}, + Tags = new [] {"Cake", "Script", "Build"}, + RequireLicenseAcceptance= false, + Symbols = false, + NoPackageAnalysis = true, + Files = new [] { + new NuSpecContent {Source = "bin/TestNuget.dll", Target = "bin"}, + }, + BasePath = "./src/TestNuget/bin/release", + OutputDirectory = "./nuget" + }; + + var nuspecFiles = GetFiles("./**/*.nuspec"); + NuGetPack(nuspecFiles, nuGetPackSettings); + + + + + + Creates a NuGet package using the specified settings. + + The context. + The settings. + + + var nuGetPackSettings = new NuGetPackSettings { + Id = "TestNuget", + Version = "0.0.0.1", + Title = "The tile of the package", + Authors = new[] {"John Doe"}, + Owners = new[] {"Contoso"}, + Description = "The description of the package", + Summary = "Excellent summary of what the package does", + ProjectUrl = new Uri("https://github.com/SomeUser/TestNuget/"), + IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestNuget/master/icons/testnuget.png"), + LicenseUrl = new Uri("https://github.com/SomeUser/TestNuget/blob/master/LICENSE.md"), + Copyright = "Some company 2015", + ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"}, + Tags = new [] {"Cake", "Script", "Build"}, + RequireLicenseAcceptance= false, + Symbols = false, + NoPackageAnalysis = true, + Files = new [] { + new NuSpecContent {Source = "bin/TestNuget.dll", Target = "bin"}, + }, + BasePath = "./src/TestNuget/bin/release", + OutputDirectory = "./nuget" + }; + + NuGetPack(nuGetPackSettings); + + + + + + Restores NuGet packages for the specified target. + + The context. + The target to restore. + + + var solutions = GetFiles("./**/*.sln"); + // Restore all NuGet packages. + foreach(var solution in solutions) + { + Information("Restoring {0}", solution); + NuGetRestore(solution); + } + + + + + + Restores NuGet packages for the specified targets. + + The context. + The targets to restore. + + + var solutions = GetFiles("./**/*.sln"); + NuGetRestore(solutions); + + + + + + Restores NuGet packages using the specified settings. + + The context. + The target to restore. + The settings. + + + var solutions = GetFiles("./**/*.sln"); + // Restore all NuGet packages. + foreach(var solution in solutions) + { + Information("Restoring {0}", solution); + NuGetRestore(solution, new NuGetRestoreSettings { NoCache = true }); + } + + + + + + Restores NuGet packages using the specified settings. + + The context. + The targets to restore. + The settings. + + + var solutions = GetFiles("./**/*.sln"); + NuGetRestore(solutions, new NuGetRestoreSettings { NoCache = true }); + + + + + + Pushes a NuGet package to a NuGet server and publishes it. + + The context. + The .nupkg file path. + The settings. + + NOTE: Starting with NuGet 3.4.2, the Source parameter is a mandatory parameter. + It is strongly recommended that you ALWAYS set the Source property within the instance. + + // Get the path to the package. + var package = "./nuget/SlackPRTGCommander.0.0.1.nupkg"; + + // Push the package. + NuGetPush(package, new NuGetPushSettings { + Source = "http://example.com/nugetfeed", + ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a" + }); + + + + + + Pushes NuGet packages to a NuGet server and publishes them. + + The context. + The .nupkg file paths. + The settings. + + NOTE: Starting with NuGet 3.4.2, the Source parameter is a mandatory parameter. + It is strongly recommended that you ALWAYS set the Source property within the instance. + + // Get the paths to the packages. + var packages = GetFiles("./**/*.nupkg"); + + // Push the package. + NuGetPush(packages, new NuGetPushSettings { + Source = "http://example.com/nugetfeed", + ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a" + }); + + + + + + Adds NuGet package source using the specified name &source to global user config + + The context. + Name of the source. + Path to the package(s) source. + + + var feed = new + { + Name = EnvironmentVariable("PUBLIC_FEED_NAME"), + Source = EnvironmentVariable("PUBLIC_FEED_SOURCE") + }; + + NuGetAddSource( + name:feed.Name, + source:feed.Source + ); + + + + + + Adds NuGet package source using the specified name, source & settings to global user config + + The context. + Name of the source. + Path to the package(s) source. + The settings. + + + var nugetSourceSettings = new NuGetSourcesSettings + { + UserName = EnvironmentVariable("PRIVATE_FEED_USERNAME"), + Password = EnvironmentVariable("PRIVATE_FEED_PASSWORD"), + IsSensitiveSource = true, + Verbosity = NuGetVerbosity.Detailed + }; + + var feed = new + { + Name = EnvironmentVariable("PRIVATE_FEED_NAME"), + Source = EnvironmentVariable("PRIVATE_FEED_SOURCE") + }; + + NuGetAddSource( + name:feed.Name, + source:feed.Source, + settings:nugetSourceSettings + ); + + + + + + Removes NuGet package source using the specified name & source from global user config + + The context. + Name of the source. + Path to the package(s) source. + + + var feed = new + { + Name = EnvironmentVariable("PRIVATE_FEED_NAME"), + Source = EnvironmentVariable("PRIVATE_FEED_SOURCE") + }; + + NuGetRemoveSource( + name:feed.Name, + source:feed.Source + ); + + + + + + Removes NuGet package source using the specified name, source & settings from global user config + + The context. + Name of the source. + Path to the package(s) source. + The settings. + + + var nugetSourceSettings = new NuGetSourcesSettings + { + UserName = EnvironmentVariable("PRIVATE_FEED_USERNAME"), + Password = EnvironmentVariable("PRIVATE_FEED_PASSWORD"), + IsSensitiveSource = true, + Verbosity = NuGetVerbosity.Detailed + }; + + var feed = new + { + Name = EnvironmentVariable("PRIVATE_FEED_NAME"), + Source = EnvironmentVariable("PRIVATE_FEED_SOURCE") + }; + + NuGetRemoveSource( + name:feed.Name, + source:feed.Source, + settings:nugetSourceSettings + ); + + + + + + Checks whether or not a NuGet package source exists in the global user configuration, using the specified source. + + The context. + Path to the package(s) source. + Whether or not the NuGet package source exists in the global user configuration. + + + var feed = new + { + Name = EnvironmentVariable("PRIVATE_FEED_NAME"), + Source = EnvironmentVariable("PRIVATE_FEED_SOURCE") + }; + if (!NuGetHasSource(source:feed.Source)) + { + Information("Source missing"); + } + else + { + Information("Source already exists"); + } + + + + + + Checks whether or not a NuGet package source exists in the global user configuration, using the specified source and settings. + + The context. + Path to the package(s) source. + The settings. + Whether the specified NuGet package source exist. + + + var nugetSourceSettings = new NuGetSourcesSettings + { + UserName = EnvironmentVariable("PRIVATE_FEED_USERNAME"), + Password = EnvironmentVariable("PRIVATE_FEED_PASSWORD"), + IsSensitiveSource = true, + Verbosity = NuGetVerbosity.Detailed + }; + var feed = new + { + Name = EnvironmentVariable("PRIVATE_FEED_NAME"), + Source = EnvironmentVariable("PRIVATE_FEED_SOURCE") + }; + if (!NuGetHasSource( + source:feed.Source, + settings:nugetSourceSettings)) + { + Information("Source missing"); + } + else + { + Information("Source already exists"); + } + + + + + + Installs a NuGet package. + + The context. + The id of the package to install. + + + NuGetInstall("MyNugetPackage"); + + + + + + Installs NuGet packages. + + The context. + The id's of the package to install. + + + NuGetInstall(new[] { "MyNugetPackage", "OtherNugetPackage" }); + + + + + + Installs a NuGet package using the specified settings. + + The context. + The id of the package to install. + The settings. + + + NuGetInstall("MyNugetPackage", new NuGetInstallSettings { + ExcludeVersion = true, + OutputDirectory = "./tools" + }); + + + + + + Installs NuGet packages using the specified settings. + + The context. + The id's of the package to install. + The settings. + + + NuGetInstall(new[] { "MyNugetPackage", "OtherNugetPackage" }, new NuGetInstallSettings { + ExcludeVersion = true, + OutputDirectory = "./tools" + }); + + + + + + Installs NuGet packages using the specified package configuration. + + The context. + The package configuration to install. + + + NuGetInstallFromConfig("./tools/packages.config"); + + + + + + Installs NuGet packages using the specified package configurations. + + The context. + The package configurations to install. + + + var packageConfigs = GetFiles("./**/packages.config"); + + NuGetInstallFromConfig(packageConfigs); + + + + + + Installs NuGet packages using the specified package configuration and settings. + + The context. + The package configuration to install. + The settings. + + + NuGetInstallFromConfig("./tools/packages.config", new NuGetInstallSettings { + ExcludeVersion = true, + OutputDirectory = "./tools" + }); + + + + + + Installs NuGet packages using the specified package configurations and settings. + + The context. + The package configurations to install. + The settings. + + + var packageConfigs = GetFiles("./**/packages.config"); + + NuGetInstallFromConfig(packageConfigs, new NuGetInstallSettings { + ExcludeVersion = true, + OutputDirectory = "./tools" + }); + + + + + + Installs NuGet packages using the specified API key, source and settings. + + + + var setting = new NuGetSetApiKeySettings { + Verbosity = NuGetVerbosity.Detailed + }; + NuGetSetApiKey("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "https://nuget.org/api/v2/", setting); + + + The context. + The API key. + Server URL where the API key is valid. + The settings. + + + + Installs NuGet packages using the specified API key and source. + + + + NuGetSetApiKey("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "https://nuget.org/api/v2/"); + + + The context. + The API key. + Server URL where the API key is valid. + + + + Set the proxy settings to be used while connecting to your NuGet feed, including settings. + + + + var setting = new NuGetSetProxySettings { + Verbosity = NuGetVerbosity.Detailed + }; + NuGetSetProxy("127.0.0.1:8080", "proxyuser","Pa$$w0rd1", setting); + + + The context. + The url of the proxy. + The username used to access the proxy. + The password used to access the proxy. + The settings. + + + + Set the proxy settings to be used while connecting to your NuGet feed. + + + + NuGetSetProxy("127.0.0.1:8080", "proxyuser","Pa$$w0rd1"); + + + The context. + The url of the proxy. + The username used to access the proxy. + The password used to access the proxy. + + + + Updates NuGet packages. + + The context. + The target to update. + + + NuGetUpdate("./tools/packages.config"); + + + + + + Updates NuGet packages. + + The context. + The targets to update. + + + var targets = GetFiles("./**/packages.config"); + + NuGetUpdate(targets); + + + + + + Updates NuGet packages using the specified settings. + + The context. + The target to update. + The settings. + + + NuGetUpdate("./tools/packages.config", new NuGetUpdateSettings { + Prerelease = true, + }); + + + + + + Updates NuGet packages using the specified settings. + + The context. + The targets to update. + The settings. + + + var targets = GetFiles("./**/packages.config"); + + NuGetUpdate(targets, new NuGetUpdateSettings { + Prerelease = true, + }); + + + + + + The NuGet packer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The log. + The tool locator. + The NuGet tool resolver + + + + Creates a NuGet package from the specified settings. + + The settings. + + + + Creates a NuGet package from the specified Nuspec or project file. + + The nuspec or project file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the base path. + + The base path. + + + + Gets or sets the output directory. + + The output directory. + + + + Gets or sets a value indicating whether package analysis should be performed. + Defaults to true. + + + true if package analysis should be performed; otherwise, false. + + + + + Gets or sets a value indicating whether referenced projects should be included. + Defaults to false. + + + true if referenced projects should be included; otherwise, false. + + + + + Gets or sets a value indicating whether a symbol package should be created. + Defaults to false. + + + true if a symbol package should be created; otherwise, false. + + + + + Gets or sets the package ID. + + The package ID. + + + + Gets or sets the Nuspec version. + + The Nuspec version. + + + + Gets or sets the package title. + + The package title. + + + + Gets or sets the package authors. + + The package authors. + + + + Gets or sets the package owners. + + The package owners. + + + + Gets or sets the package description. + + The package description. + + + + Gets or sets the package summary. + + The package summary. + + + + Gets or sets the package project URL. + + The package project URL. + + + + Gets or sets the package icon URL. + + The package icon URL. + + + + Gets or sets the package license URL. + + The package license URL. + + + + Gets or sets the package copyright. + + The package copyright. + + + + Gets or sets the package release notes. + + The package release notes. + + + + Gets or sets the package tags. + + The package tags. + + + + Gets or sets a value indicating whether this package should be marked as a development dependency. + + + true if a development dependency; otherwise, false. + + + + + Gets or sets a value indicating whether users has to accept the package license. + + + true if users has to accept the package license; otherwise, false. + + + + + Gets or sets the package files. + + The package files. + + + + Gets or sets the package dependencies. + + The package files. + + + + Gets or sets the verbosity. + + The verbosity. + + + + Gets or sets the properties. + + + The properties. + + + + + Gets or sets the version of MSBuild to be used with this command. + By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild. + This setting requires NuGet V3 or later. + + The version of MSBuild to be used with this command. + + + + The NuGet package pusher. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver. + The logger. + + + + Pushes a NuGet package to a NuGet server and publishes it. + + The package file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the server URL. If not specified, nuget.org is used unless + DefaultPushSource config value is set in the NuGet config file. + Starting with NuGet 2.5, if NuGet.exe identifies a UNC/folder source, + it will perform the file copy to the source. + + The server URL. + + + + Gets or sets the API key for the server. + + The API key for the server. + + + + Gets or sets the timeout for pushing to a server. + Defaults to 300 seconds (5 minutes). + + The timeout for pushing to a server. + + + + Gets or sets the verbosity. + + The verbosity. + + + + Gets or sets the NuGet configuration file. + + The NuGet configuration file. + + + + The NuGet package restorer used to restore solution packages. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The NuGet tool resolver + + + + Restores NuGet packages using the specified settings. + + The target file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether package restore consent is granted before installing a package. + + + true if package restore consent is granted; otherwise, false. + + + + + Gets or sets the packages folder. + + + + + Gets or sets a list of packages sources to use for this command. + + + + + Gets or sets a value indicating whether or not to use the machine cache as the first package source. + + + true to not use the machine cache as the first package source; otherwise, false. + + + + + Gets or sets a value indicating whether or not to disable parallel processing of packages for this command. + + + true to disable parallel processing; otherwise, false. + + + + + Gets or sets the amount of output details. + + + + + Gets or sets the NuGet configuration file. + If not specified, the file %AppData%\NuGet\NuGet.config is used as the configuration file. + + + + + Gets or sets a list of packages sources to use as fallbacks for this command. + This setting requires NuGet V3 or later. + + The list of packages sources to use as fallbacks for this command. + + + + Gets or sets the version of MSBuild to be used with this command. + By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild. + This setting requires NuGet V3 or later. + + The version of MSBuild to be used with this command. + + + + Represents NuGet verbosity. + + + + + Verbosity: Normal + + + + + Verbosity: Quiet + + + + + Verbosity: Detailed + + + + + The NuGet package updater. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The nuget tool resolver. + + + + Updates NuGet packages using the specified settings. + + The target file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the package ids to update. + + The package ids to update. + + + + Gets or sets a list of package sources to use for this command. + + + + + Gets or sets a value indicating whether to look for updates with the highest + version available within the same major and minor version as the installed package. + + + true if safe; otherwise, false. + + + + + Gets or sets a value indicating whether to allow updating to prerelease versions. + This flag is not required when updating prerelease packages that are already installed. + + + true to allow updating to prerelease versions; otherwise, false. + + + + + Gets or sets the amount of output details. + + + + + Gets or sets the version of MSBuild to be used with this command. + By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild. + This setting requires NuGet V3 or later. + + The version of MSBuild to be used with this command. + + + + Contains functionality related to running NUnit v2 and v3 unit tests. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=NUnit.ConsoleRunner" + + + + + + + Runs all NUnit unit tests in the assemblies matching the specified pattern. + + The context. + The pattern. + + + NUnit3("./src/**/bin/Release/*.Tests.dll"); + + + + + + Runs all NUnit unit tests in the assemblies matching the specified pattern, + using the specified settings. + + The context. + The pattern. + The settings. + + + NUnit3("./src/**/bin/Release/*.Tests.dll", new NUnit3Settings { + NoResults = true + }); + + + + + + Runs all NUnit unit tests in the specified assemblies. + + The context. + The assemblies. + + + NUnit3(new [] { "./src/Example.Tests/bin/Release/Example.Tests.dll" }); + + + + + + Runs all NUnit unit tests in the specified assemblies. + + The context. + The assemblies. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + NUnit3(testAssemblies); + + + + + + Runs all NUnit unit tests in the specified assemblies, + using the specified settings. + + The context. + The assemblies. + The settings. + + + NUnit3(new [] { "./src/Example.Tests/bin/Release/Example.Tests.dll" }, new NUnit3Settings { + NoResults = true + }); + + + + + + Runs all NUnit unit tests in the specified assemblies, + using the specified settings. + + The context. + The assemblies. + The settings. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + NUnit3(testAssemblies, new NUnit3Settings { + NoResults = true + }); + + + + + + The /domain option controls of the creation of AppDomains for running tests. + + + + + Create a separate AppDomain for each assembly if more than one is listed on the command + line, otherwise creates a single AppDomain. + + + + + No AppDomain is created - the tests are run in the primary domain. + This normally requires copying the NUnit assemblies into the same directory as your tests. + + + + + A single test AppDomain is created for all test assemblies + This is how NUnit worked prior to version 2.4. + + + + + An AppDomain is created for each assembly specified on the command line. + + + + + Represents the possible values for the Labels option. + + + + + Does not output labels. This is the default. + + + + + Outputs labels for tests that are run. + + + + + Outputs labels for all tests. + + + + + Represents the various ways NUnit loads tests in processes. + + + + + A separate process is created for each test assembly. This is the default. + + + + + One separate process is created to run all of the test assemblies. + + + + + All the tests are run in the nunit-console process. + + + + + The NUnit unit test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs the tests in the specified assemblies, using the specified settings. + + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Customized exit code handling. + Throws on non-zero exit code + + The process exit code + + + + Contains settings used by . + + + + + Gets or sets the list of tests to run or explore. + + + A comma-separated list of test names. + + + + + Gets or sets a file containing the tests to run. + + + File path containing a list of tests to run, one per line. + + + + + Gets or sets the test selection expression indicating what tests will be run. + + + The --where option is intended to extend or replace the earlier + --test, --include and --exclude options by use of a selection expression + describing exactly which tests to use. Examples of usage are: + --where:cat==Data + --where "method =~ /DataTest*/ && cat = Slow" + + + + + Gets or sets the default timeout to be used for test cases in this run. + If any test exceeds the timeout value, it is cancelled and reported as an error. + + + The timeout in milliseconds. + + + + + Gets or sets the random seed used to generate test cases. + + + The random seed. + + + + + Gets or sets the number of worker threads to be used + in running tests.If not specified, defaults to + 2 or the number of processors, whichever is greater. + + + The number of worker threads. + + + + + Gets or sets a value indicating whether execution of the test run should terminate + immediately on the first test failure or error. + + + true if execution of the test run should terminate immediately on the first test failure or error; + otherwise, false. + + + + + Gets or sets the directory to use for output files. If + not specified, defaults to the current directory. + + + PATH of the directory. + + + + + Gets or sets the location that NUnit should write test output. + + The location that NUnit should write test output. + + + + Gets or sets the location that NUnit should write test error output. + + The location that NUnit should write test error output. + + + + Gets or sets a value indicating whether to print full report of all test results. + + + true if a full report of test results should be printed; + otherwise, false. + + + + + Gets or sets the name of the XML result file. + + + The name of the XML result file. Defaults to TestResult.xml. + + + + + Gets or sets the format that the results should be in. Results must be set to + have any effect. Specify nunit2 to output the results in NUnit 2 xml format. + nunit3 may be specified for NUnit 3 format, however this is the default. Additional + formats may be supported in the future, check the NUnit documentation. + + + The format of the result file. Defaults to nunit3. + + + + + Gets or sets the file name of an XSL transform that will be applied to the results. + + + The name of an XSLT file that will be applied to the results. + + + + + Gets or sets a value indicating whether to generate the XML result file. + + + true if the XML result file should be generated; otherwise, false. + + + + + Gets or sets a value specifying whether to write test case names to the output. + + + On to write labels for tests that are run or All to write labels + for all tests. + + + + + Gets or sets a value indicating whether to turn on TeamCity service messages. + + + true to turn on TeamCity service messages; otherwise, false. + + + + + Gets or sets a value indicating whether to show copyright information at the start of the program. + + + true if to show copyright information at the start of the program; otherwise, false. + + + + + Gets or sets a value indicating whether to show the output in color. + + + true disable color output; otherwise, false. + + + + + Gets or sets a value indicating whether to show additional information as the tests run. + + + true shows additional information as the tests run; otherwise, false. + + + + + Gets or sets the name of a project configuration to load (e.g.:Debug). + This selects the configuration within the NUnit project file. + + + The name of the configuration to load. + + + + + Gets or sets a value indicating whether to run tests in an x86 process on 64 bit systems. + + + true to run tests in an x86 process on 64 bit systems; otherwise, false. + + + + + Gets or sets a value indicating whether to Dispose each test runner after it has finished + running its tests. + + + true to Dispose each test runner after it has finished + running its tests; otherwise, false. + + + + + Gets or sets a value indicating whether to shadow copy tests. + Default value is false. + + + true if tests should be run as a shadow copy; otherwise, false. + + + + + Gets or sets the version of the runtime to be used when executing tests. + + + The version of the runtime to be used when executing tests. + + + + + Gets or sets a value indicating how NUnit should load tests in processes. + The Default value is . + + + + + Gets or sets a value to control creation of AppDomains for running tests. + Corresponds to the /domain command line switch. + The default is to use multiple domains if multiple assemblies are listed on the command line, + otherwise a single domain is used. + + + + + Gets or sets the maximum number of test assembly agents to run at one + time. If not specified, there is no limit. + + + The maximum number of test assembly agents to run at one time. + + + + + Contains functionality related to running NUnit tests. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=NUnit.Runners&version=2.6.4" + + + + + + + Runs all NUnit unit tests in the assemblies matching the specified pattern. + + + + NUnit("./src/UnitTests/*.dll"); + + + The context. + The pattern. + + + + Runs all NUnit unit tests in the assemblies matching the specified pattern, + using the specified settings. + + + + NUnit("./src/UnitTests/*.dll", new NUnitSettings { + Timeout = 4000, + StopOnError = true + }); + + + The context. + The pattern. + The settings. + + + + Runs all NUnit unit tests in the specified assemblies. + + + + var assemblies = new [] { + "UnitTests1.dll", + "UnitTests2.dll" + }; + NUnit(assemblies); + + + The context. + The assemblies. + + + + Runs all NUnit unit tests in the specified assemblies. + + + + var assemblies = GetFiles("./src/UnitTests/*.dll"); + NUnit(assemblies); + + + The context. + The assemblies. + + + + Runs all NUnit unit tests in the specified assemblies, + using the specified settings. + + + + var assemblies = new [] { + "UnitTests1.dll", + "UnitTests2.dll" + }; + NUnit(assemblies, new NUnitSettings { + Timeout = 4000, + StopOnError = true + }); + + + The context. + The assemblies. + The settings. + + + + Runs all NUnit unit tests in the specified assemblies, + using the specified settings. + + + + var assemblies = GetFiles(""./src/UnitTests/*.dll""); + NUnit(assemblies, new NUnitSettings { + Timeout = 4000, + StopOnError = true + }); + + + The context. + The assemblies. + The settings. + + + + The /domain option controls of the creation of AppDomains for running tests. + + + + + Create a separate AppDomain for each assembly listed on the command line. + + + + + No domain is created - the tests are run in the primary domain. + This normally requires copying the NUnit assemblies into the same directory as your tests. + + + + + A test domain is created - this is how NUnit worked prior to version 2.4 + + + + + Represents the various ways NUnit loads tests in processes. + + + + + All the tests are run in the nunit-console process. This is the default. + + + + + A separate process is created to run the tests. + + + + + A separate process is created for each test assembly. + + + + + The NUnit unit test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs the tests in the specified assemblies, using the specified settings. + + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Customized exit code handling. + Throws on non-zero exit code + + The process exit code + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name of the XML result file. + + + The name of the XML result file. Defaults to TestResult.xml. + + + + + Gets or sets a value indicating whether to generate the XML result file. + + + true if the XML result file should be generated; otherwise, false. + + + + + Gets or sets the version of the runtime to be used when executing tests. + + + The version of the runtime to be used when executing tests. + + + + + Gets or sets the categories to include in a run. + + The categories to include in a run. + + + + Gets or sets the categories to exclude from a run. + + + The categories to exclude from a run. + + + + + Gets or sets the default timeout to be used for test cases in this run. + If any test exceeds the timeout value, it is cancelled and reported as an error. + + The default timeout to be used for test cases in this run. + + + + Gets or sets a value indicating whether tests should be run as a shadow copy. + Default value is true. + + + true if tests should be run as a shadow copy; otherwise, false. + + + + + Gets or sets a value indicating whether the main thread should be used for running tests. + + + true if the main thread should be used for running tests; otherwise, false. + + + + + Gets or sets a value indicating whether to show copyright information at the start of the program. + + + true if to show copyright information at the start of the program; otherwise, false. + + + + + Gets or sets a value indicating whether execution of the test run should terminate + immediately on the first test failure or error. + + + true if execution of the test run should terminate immediately on the first test failure or error; + otherwise, false. + + + + + Gets or sets the amount of information that NUnit should write to its internal trace log. + + The amount of information that NUnit should write to its internal trace log. + + + + Gets or sets the location that NUnit should write test output. + + The location that NUnit should write test output. + + + + Gets or sets the location that NUnit should write test error output. + + The location that NUnit should write test error output. + + + + Gets or sets a value indicating how NUnit should load tests in processes. + The Default value is + + + + + Gets or sets a value indicating whether Single Threaded Apartment state (STA) will be used. + Corresponds to the /apartment command line option + + + + + Gets or sets a value to control creation of AppDomains for running tests. + Corresponds to the /domain command line switch. + The default is to use multiple domains if multiple assemblies are listed on the command line. + Otherwise a single domain is used. + + + + + Contains functionality related to Octopus Deploy. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the appropriate settings class: + + #tool "nuget:?package=OctopusTools" + + + + + + + Creates a release for the specified Octopus Deploy Project. + + The cake context. + The name of the project. + The settings. + + + // Minimum required + OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings { + Server = "http://octopus-deploy.example", + ApiKey = "API-XXXXXXXXXXXXXXXXXXXX" + }); + + OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings { + Server = "http://octopus-deploy.example", + Username = "DeployUser", + Password = "a-very-secure-password" + }); + + OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings { + ConfigurationFile = @"C:\OctopusDeploy.config" + }); + + // Additional Options + OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings { + ToolPath = "./tools/OctopusTools/Octo.exe" + EnableDebugLogging = true, + IgnoreSslErrors = true, + EnableServiceMessages = true, // Enables teamcity services messages when logging + ReleaseNumber = "1.8.2", + DefaultPackageVersion = "1.0.0.0", // All packages in the release should be 1.0.0.0 + Packages = new Dictionary<string, string> + { + { "PackageOne", "1.0.2.3" }, + { "PackageTwo", "5.2.3" } + }, + PackagesFolder = @"C:\MyOtherNugetFeed", + + // One or the other + ReleaseNotes = "Version 2.0 \n What a milestone we have ...", + ReleaseNotesFile = "./ReleaseNotes.md", + + IgnoreExisting = true // if this release number already exists, ignore it + }); + + + + + + Pushes the specified package to the Octopus Deploy repository + + The cake context + /// The Octopus server URL + The user's API key + Path to the package + The settings + + + + Pushes the specified packages to the Octopus Deploy repository + + The cake context + The Octopus server URL + The user's API key + Paths to the packages + The settings + + + + Contains settings used by . + + + + + Contains the common settings used by all commands in . + + + + + Gets or sets the username to use when authenticating with the server + + + + + Gets or sets the password to use when authenticating with the server + + + + + Gets or sets the octopus server url. + + + + + Gets or sets the user's API key. + + + + + Gets or sets the text file of default values + + + + + Gets or sets a value indicating whether the enable debug logging flag is set + + + + + Gets or sets a value indicating whether the ignore SSL errors flag is set + + + + + Gets or sets a value indicating whether the enable service messages flag is set + + + + + Gets or sets the release number to use for the new release. + + + + + Gets or sets the default version number of all packages to use the new release. + + + + + Gets or sets the version number to use for a package in the release. + + + + + Gets or sets the folder containing NuGet packages. + + + + + Gets or sets the release notes for the new release. + + + + + Gets or sets the path to a file that contains Release Notes for the new release. + + + + + Gets or sets a value indicating whether the Ignore Existing flag. + + + + + The Octopus Deploy package push runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Pushes the specified packages to Octopus Deploy internal repository + + The Octopus server URL + The user's API key + Paths to the packages to be pushed + The settings + + + + The Octopus Deploy release creator runner + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Creates a release for the specified project in OctopusDeploy + + The target project name + The settings + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets a value indicating whether to overwrite an existing package + + + + + Contains functionality related to OpenCover. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=OpenCover" + + + + + + + Runs OpenCover + for the specified action and settings. + + The context. + The action to run OpenCover for. + The OpenCover output file. + The settings. + + + OpenCover(tool => { + tool.XUnit2("./**/App.Tests.dll", + new XUnit2Settings { + ShadowCopy = false + }); + }, + new FilePath("./result.xml"), + new OpenCoverSettings() + .WithFilter("+[App]*") + .WithFilter("-[App.Tests]*")); + + + + + + The OpenCover runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs OpenCover with the specified settings. + + The context. + The action. + The output file path. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets the filters. + This represents the -filter option. + + The filters. + + + + Gets attribute filters used to exclude classes or methods. + This represents the -excludebyattribute option. + + The excluded attributes. + + + + Gets file filters used to excluded classes or methods. + This represents the -excludebyfile option. + + The excluded file filters. + + + + Gets or sets a value indicating whether or not auto-implemented properties should be skipped. + + + + + Gets or sets the register option + + + + + Gets or sets the Return target code offset to be used + + + + + Gets or sets a value indicating whether the OldStyle option for OpenCover should be used + + + + + Contains extensions for . + + + + + Adds the filter. + + The settings. + The filter. + The same instance so that multiple calls can be chained. + + + + Exclude a class or method by filter + that match attributes that have been applied. + + The settings. + The filter. + The same instance so that multiple calls can be chained. + + + + Exclude a class (or methods) by filter that match the filenames. + + The settings. + The filter. + The same instance so that multiple calls can be chained. + + + + Contains functionality related to ReportUnit. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=ReportUnit" + + + + + + + Converts the reports in the specified directory into human readable form. + + The context. + The input folder. + + Provide only an input folder, which will causes ReportUnit to search entire directory for report files. + Cake task: + + ReportUnit("c:/temp"); + + + + + + Converts the reports in the specified directory into human readable form. + + The context. + The input folder. + The ReportUnit settings. + + Provide an input folder and custom ToolPath, which will causes ReportUnit to search entire directory for report files. + Cake task: + + ReportUnit("c:/temp", new ReportUnitSettings(){ + ToolPath = "c:/tools/reportunit.exe" + }); + + + + + + Converts the reports in the specified directory into human readable form and outputs to specified folder. + + The context. + The input folder. + The output folder. + The ReportUnit settings. + + Provide both input and output folder, which will causes ReportUnit to search entire directory for report files, and output the results to specified location. + Cake task: + + ReportUnit("c:/temp/input", "c:/temp/output"); + + + + + + Converts the single specified report into human readable form and outputs to specified file. + + The context. + The input file. + The output file. + + Provide both input and output file, which will causes ReportUnit to transform only the specific file, and output to the specified location. + Cake task: + + ReportUnit("c:/temp/input", "c:/temp/output"); + + + + + + Converts the single specified report into human readable form and outputs to specified file. + + The context. + The input file. + The output file. + The ReportUnit settings. + + Provide both input and output file, which will causes ReportUnit to transform only the specific file, and output to the specified location. Also use a custom path for the reportunit.exe. + Cake task: + + ReportUnit("c:/temp/input", "c:/temp/output", new ReportUnitSettings(){ + ToolPath = "c:/tools/reportunit.exe" + }); + + + + + + ReportUnit runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Converts the reports from specified folder into human readable form according to the specified settings. + + The input folder. + The output folder. + The ReportUnit settings. + + + + Converts the specified report into human readable form according to the specified settings. + + The input file. + The output file. + The ReportUnit settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Contains functionality related to ReportGenerator. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=ReportGenerator" + + + + + + + Converts the coverage report specified by the glob pattern into human readable form. + + The context. + The glob pattern. + The output directory. + + + ReportGenerator("c:/temp/coverage/*.xml", "c:/temp/output"); + + + + + + Converts the coverage report specified by the glob pattern into human readable form using the specified settings. + + The context. + The glob pattern. + The output directory. + The settings. + + + ReportGenerator("c:/temp/coverage/*.xml", "c:/temp/output", new ReportGeneratorSettings(){ + ToolPath = "c:/tools/reportgenerator.exe" + }); + + + + + + Converts the specified coverage report into human readable form. + + The context. + The coverage report. + The output directory. + + + ReportGenerator("c:/temp/coverage/report.xml", "c:/temp/output"); + + + + + + Converts the specified coverage report into human readable form using the specified settings. + + The context. + The coverage report. + The output directory. + The settings. + + + ReportGenerator("c:/temp/coverage.xml", "c:/temp/output", new ReportGeneratorSettings(){ + ToolPath = "c:/tools/reportgenerator.exe" + }); + + + + + + Converts the specified coverage reports into human readable form. + + The context. + The coverage reports. + The output directory. + + + ReportGenerator(new[] { "c:/temp/coverage1.xml", "c:/temp/coverage2.xml" }, "c:/temp/output"); + + + + + + Converts the specified coverage reports into human readable form using the specified settings. + + The context. + The coverage reports. + The output directory. + The settings.> + + + ReportGenerator(new[] { "c:/temp/coverage1.xml", "c:/temp/coverage2.xml" }, "c:/temp/output", new ReportGeneratorSettings(){ + ToolPath = "c:/tools/reportgenerator.exe" + }); + + + + + + ReportGenerator runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Converts the specified coverage reports into human readable form according to the specified settings. + + The coverage reports. + The output directory. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the list of coverage reports that should be parsed. + + + + + Gets or sets the directories which contain the corresponding source code. + The source files are used if coverage report contains classes without path information. + + + + + Gets or sets the directory for storing persistent coverage information. + Can be used in future reports to show coverage evolution. + + + + + Gets or sets the list of assemblies that should be included or excluded in the report. + Exclusion filters take precedence over inclusion filters. + Wildcards are allowed. + + + + + Gets or sets the list of classes that should be included or excluded in the report. + Exclusion filters take precedence over inclusion filters. + Wildcards are allowed. + + + + + Gets or sets the verbosity level of the log messages. + + + + + Represents ReportGenerator's output formats + + + + + Badge report. + + + + + Html report. + + + + + Html summary report. + + + + + Latex report. + + + + + Latex summary report. + + + + + Text summary report. + + + + + Xml report. + + + + + Xml summary report. + + + + + Represents ReportGenerator's logging verbosity. + + + + + Verbosity: Verbose. + + + + + Verbosity: Info. + + + + + Verbosity: Error. + + + + + Defines the recovery model for SQL Server + + + + + Doesn't change the mode + + + + + Does not create backup before migration + + + + + Creates log backup before migration + + + + + Contains functionality related to RoundhousE. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=roundhouse" + + + + + + + Executes Roundhouse with the given configured settings. + + The context. + The settings. + + + RoundhouseMigrate(new RoundhouseSettings{ + ServerName = "Sql2008R2", + DatabaseName = "AdventureWorks2008R2", + SqlFilesDirectory = "./src/sql" + }); + + + + + + Executes Roundhouse migration to drop the database using the provided settings. + + The context. + The settings. + + + RoundhouseDrop(new RoundhouseSettings{ + ServerName = "Sql2008R2", + DatabaseName = "AdventureWorks2008R2" + }); + + + + + + The Roundhouse console application runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs Roundhouse with the given settings. + + The settings. + Will drop/delete the database if set to true. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the server name. + + + The server on which create/migrate should happen. + + + + + Gets or sets the database name. + + + The database you want to create/migrate. + + + + + Gets or sets the connection string. + + + As an alternative to ServerName and Database - You can provide an entire connection string instead. + + + + + Gets or sets the connection string for admin connections. + + + This is used for connecting to master when you may have a different uid and password than normal. + + + + + Gets or sets the timeout (in seconds) for normal connections. + + + This is the timeout when commands are run. This is not for admin commands or restore. + + + + + Gets or sets the timeout (in seconds) for admin connections. + + + This is the timeout when administration commands are run (except for restore, which has its own). + + + + + Gets or sets the sql files directory. + + + The directory where your SQL scripts are. + + + + + Gets or sets the location of the source code repository + + + Path to code repository to be able to correlate versions + + + + + Gets or sets the version file. + + + Path to the file to use for applying version number. Either a .XML file, a .DLL or a .TXT file that a version can be resolved from. + + + + + Gets or sets the XPath to locate version in the . + + + Works in conjunction with an XML version file. + + + + + Gets or sets the folder name for 'alterDatabase' scripts. + + + The name of the folder where you keep your alter database scripts. Read up on token replacement. You will want to use {{DatabaseName}} here instead of specifying a database name. + + + + + Gets or sets the folder name for 'runAfterCreateDatabase' scripts. + + + The name of the folder where you will keep scripts that ONLY run after a database is created. + + + + + Gets or sets the folder name for 'runBeforeUp' scripts. + + + The name of the folder where you keep scripts that you want to run before your update scripts. + + + + + Gets or sets the folder name for 'up' scripts. + + + The name of the folder where you keep your update scripts. + + + + + Gets or sets the folder name for 'runFirstAfterUp' scripts. + + + The name of the folder where you keep any functions, views, or sprocs that are order dependent. If you have a function that depends on a view, you definitely need the view in this folder. + + + + + Gets or sets the folder name for 'functions' scripts. + + + The name of the folder where you keep your functions. + + + + + Gets or sets the folder name for 'views' scripts. + + + The name of the folder where you keep your views. + + + + + Gets or sets the folder name for 'sprocs' scripts. + + + The name of the folder where you keep your stored procedures. + + + + + Gets or sets the folder name for 'indexes' scripts. + + + The name of the folder where you keep your indexes. + + + + + Gets or sets the folder name for 'runAfterOtherAnyTimeScripts' scripts. + + + The name of the folder where you keep scripts that will be run after all of the other any time scripts complete. + + + + + Gets or sets the folder name for 'permissions' scripts. + + + The name of the folder where you keep your permissions scripts. + + + + + Gets or sets the folder name for 'beforeMig' scripts. + + + The name of the folder for scripts to run before migration and outside of a transaction. + + + + + Gets or sets the folder name for 'afterMig' scripts. + + + The name of the folder for scripts to run before migration and outside of a transaction. + + + + + Gets or sets the schema name to use instead of [RoundhousE]. + + + The schema where RH stores it's tables. + + + + + Gets or sets the environment for RH to be scoped. + + + This allows RH to be environment aware and only run scripts that are in a particular environment based on the namingof the script. LOCAL.something**.ENV.**sql would only be run in the LOCAL environment. + + + + + Gets or sets a value indicating whether perform a restore. + + + This instructs RH to do a restore (with the parameter) of a database before running migration scripts. + + + + + Gets or sets the restore file path. + + + File path of back when Restore is set to true + + + + + Gets or sets the custom database creation script. + + + This instructs RH to use this script for creating a database instead of the default based on the SQLType. + + + + + Gets or sets the output path. + + + Path to where migration artifacts are stored. + + + + + Gets or sets a value indicating whether to warn when previously run scripts have changed. + + + Instructs RH to execute changed one time scripts (DDL/DML in 'Up'/) that have previously been run against the database instead of failing. A warning is logged for each one time scripts that is rerun. + + + + + Gets or sets a value indicating whether to keep RH silent. + + + Tells RH not to ask for any input when it runs. + + + + + Gets or sets database type. + + + Database Type (fully qualified class name implementing [roundhouse.sql.Database, roundhouse]) + + + + + Gets or sets a value indicating whether to drop the DB. + + + This instructs RH to remove a database and not run migration scripts. + + + + + Gets or sets a value indicating whether to use transactions. + + + This instructs RH to run inside of a transaction. + + + + + Gets or sets SQL Server recovery mode. + + + This sets the recovery model for SQL Server during migration. (NoChange, Simple, Full) + + + + + Gets or sets a value indicating whether to perform a dry run. + + + This instructs RH to log what would have run, but not to actually run anything against the database. Use this option if you are trying to figure out what RH is going to do. + + + + + Represents a sign tool resolver. + + + This exists only to be able to test the sign tool. + Do not use this interface since it will be removed. + + + + + Resolves the path to the sign tool. + + The path to the sign tool. + + + + Contains functionality related to signing assemblies with PFX certificates using SignTool. + + In order to use the commands for this alias, SignTool will need to be installed on the machine where + the Cake script is being executed. This is typically achieved by installing the correct Windows SDK. + + + + + + Signs the specified assembly. + + The context. + The target assembly. + The settings. + + + Task("Sign") + .IsDependentOn("Clean") + .IsDependentOn("Restore") + .IsDependentOn("Build") + .Does(() => + { + var file = "Core.dll"; + Sign(file, new SignToolSignSettings { + TimeStampUri = new Uri("http://timestamp.digicert.com"), + CertPath = "digitalcertificate.pfx", + Password = "TopSecret" + }); + }); + + + + + + Signs the specified assembly. + + The context. + The target assembly. + The settings. + + + Task("Sign") + .IsDependentOn("Clean") + .IsDependentOn("Restore") + .IsDependentOn("Build") + .Does(() => + { + var file = new FilePath("Core.dll"); + Sign(files, new SignToolSignSettings { + TimeStampUri = new Uri("http://timestamp.digicert.com"), + CertPath = "digitalcertificate.pfx", + Password = "TopSecret" + }); + }); + + + + + + Signs the specified assemblies. + + The context. + The target assembly. + The settings. + + + Task("Sign") + .IsDependentOn("Clean") + .IsDependentOn("Restore") + .IsDependentOn("Build") + .Does(() => + { + var files = new string[] { "Core.dll", "Common.dll" }; + Sign(files, new SignToolSignSettings { + TimeStampUri = new Uri("http://timestamp.digicert.com"), + CertPath = "digitalcertificate.pfx", + Password = "TopSecret" + }); + }); + + + + + + Signs the specified assemblies. + + The context. + The target assembly. + The settings. + + + Task("Sign") + .IsDependentOn("Clean") + .IsDependentOn("Restore") + .IsDependentOn("Build") + .Does(() => + { + var files = GetFiles(solutionDir + "/**/bin/" + configuration + "/**/*.exe"); + Sign(files, new SignToolSignSettings { + TimeStampUri = new Uri("http://timestamp.digicert.com"), + CertPath = "digitalcertificate.pfx", + Password = "TopSecret" + }); + }); + + + + + + The SignTool SIGN assembly runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The registry. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + The registry. + The resolver. + + + + Signs the specified assembly. + + The assembly path. + The settings. + + + + Gets the name of the tool. + + + The name of the tool (SignTool SIGN). + + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Contains settings used by . + + + + + Gets or sets the timestamp server's URL. + + + + + Gets or sets the thumbprint for locating a certificate in the store. + + + + + Gets or sets the PFX certificate path. + + + + + Gets or sets the PFX certificate password. + + + + + Gets or sets the signed content's description. + + + + + Gets or sets the signed content's expanded description URL. + + + + + SpecFlow MSTest execution report runner. + + + + + Base class for all SpecFlow related tools + + The settings type + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Appends the SpecFlowSettings arguments to builder. + + The settings. + The argument builder. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs SpecFlow Test Execution Report with the specified settings. + + The context. + The action. + The project file path. + The settings. + + + + Contains settings used by . + + + + + Contains settings used by . + + + + + Gets or sets the generated Output File. Optional. + Default: TestResult.html + + + + + Gets or sets the custom XSLT file to use, defaults to built-in stylesheet if not provided. Optional. + Default: not specified + + + + + SpecFlow StepDefinition execution report runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs SpecFlow StepDefinitionReport with the specified settings. + + The project file path. + The settings. + + + + Contains settings used by . + + + + + Gets or sets the path for the compiled SpecFlow project. Optional. + Default: bin\Debug + + + + + Contains functionality related to SpecFlow. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the appropriate settings class: + + #tool "nuget:?package=SpecFlow" + + + + + + + Creates a report that shows the usage and binding status of the steps for the entire project. + You can use this report to find both unused code in the automation layer and scenario steps that have no definition yet. + See SpecFlow Documentation for more information. + + The context. + The path of the project file containing the feature files. + + + + Creates a report that shows the usage and binding status of the steps for the entire project. + You can use this report to find both unused code in the automation layer and scenario steps that have no definition yet. + See SpecFlow Documentation for more information. + + The context. + The path of the project file containing the feature files. + The settings. + + + + Creates a formatted HTML report of a test execution. + The report contains a summary about the executed tests and the result and also a detailed report for the individual scenario executions. + See SpecFlow Documentation for more information. + + The context. + The action to run SpecFlow for. Supported actions are: MSTest, NUnit3 and XUnit2 + The path of the project file containing the feature files. + + + + Creates a formatted HTML report of a test execution. + The report contains a summary about the executed tests and the result and also a detailed report for the individual scenario executions. + See SpecFlow Documentation for more information. + + The context. + The action to run SpecFlow for. Supported actions are: MSTest, NUNit, NUNit3, XUnit and XUnit2 + The path of the project file containing the feature files. + The settings. + + + + Contains functionality related to TextTransform. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=Mono.TextTransform" + + + + + + + Transform a text template. + + + + // Transform a .tt template. + var transform = File("./src/Cake/Transform.tt"); + TransformTemplate(transform); + + + The context. + The source file. + + + + Transform a text template. + + + + // Transform a .tt template. + var transform = File("./src/Cake/Transform.tt"); + TransformTemplate(transform, new TextTransformSettings { OutputFile="./src/Cake/Transform.cs" }); + + + The context. + The source file. + The settings. + + + + The Text Transform runner. + + + + + Runs Text Transform with the specified files and settings. + + The source file. + The settings. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the assembly used for compiling and running the text template. + + + The assembly. + + + + + Gets or sets the output file for the transform. + + + The output file. + + + + + Gets or sets namespace that is used for compiling the text template. + + + The namespace. + + + + + Gets or sets a directory that contains the text templates sourced in the specified text template. + + + + + Gets or sets a directory to search for assemblies specified within the text template. + + + The reference path. + + + + + Contains functionality related to running VSTest unit tests. + + + + + Runs all VSTest unit tests in the assemblies matching the specified pattern. + + + + VSTest("./Tests/*.UnitTests.dll"); + + + The context. + The pattern. + + + + Runs all VSTest unit tests in the assemblies matching the specified pattern. + + + + VSTest("./Tests/*.UnitTests.dll", new VSTestSettings() { Logger = VSTestLogger.Trx }); + + + The context. + The pattern. + The settings. + + + + Runs all VSTest unit tests in the specified assemblies. + + + + var paths = new List<FilePath>() { "./assemblydir1", "./assemblydir2" }; + VSTest(paths); + + + The context. + The assembly paths. + + + + Runs all VSTest unit tests in the specified assemblies. + + + + var paths = new List<FilePath>() { "./assemblydir1", "./assemblydir2" }; + VSTest(paths, new VSTestSettings() { InIsolation = true }); + + + The context. + The assembly paths. + The settings. + + + + Target platform architecture to be used for test execution. + + + + + Use default platform architecture. + + + + + Platform architecture: x86. + + + + + Platform architecture: x64. + + + + + Platform architecture: ARM. + + + + + Target .NET Framework version to be used for test execution. + + + + + Use default .NET Framework version. + + + + + .NET Framework version: 3.5. + + + + + .NET Framework version: 4.0. + + + + + .NET Framework version: 4.5. + + + + + Loggers available for outputting test results. + + + + + No logging of test results. + + + + + Log results to a Visual Studio test results file. + + + + + The VSTest unit test runner. + Used by Visual Studio 2012 and newer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool servce. + + + + Runs the tests in the specified assembly. + + The assembly path. + The settings. + + + + Gets the name of the tool. + + The tool name. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Contains settings used by . + + + + + Gets or sets the settings filename to be used to control additional settings such as data collectors. + + + + + Gets or sets a value indicating whether to run tests within the vstest.console.exe process. + This makes vstest.console.exe process less likely to be stopped on an error in the tests, but tests might run slower. + Defaults to false. + + + true if running in isolation; otherwise, false. + + + + + Gets or sets the target platform architecture to be used for test execution. + + + + + Gets or sets the target .NET Framework version to be used for test execution. + + + + + Gets or sets the logger to use for test results. + + + + + The architecture for the package. + + + + + Architecture: x86_64 + + + + + Architecture: x86 + + + + + Architecture: Itanium + + + + + The WiX Candle runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs Candle with the specified source files and settings. + + The source files (.wxs) to compile. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets a value indicating which architecture to build the MSI package for. + + + + + Gets or sets the pre processor defines. + + + + + Gets or sets the WiX extensions to use. + + + + + Gets or sets a value indicating whether FIPS compliant algorithms should be used. + + + true if FIPS compliant algorithms should be used, otherwise false. + + + + + Gets or sets a value indicating whether to show the logo information. + + + + + Gets or sets the output directory for the object files. + + + + + Gets or sets a value indicating whether to show pedantic messages. + + + + + Gets or sets a value indicating whether to show source trace for errors, warnings and verbose messages. + + + + + Gets or sets a value indicating whether to show verbose output. + + + + + Type of elements to generate + + + + + Generates components + + + + + Generates a container + + + + + Generates a payload group + + + + + Generates a layout + + + + + The type of object file to harvest from. + + + + + Harvest a directory. + + + + + Harvest a file + + + + + Harvest outputs of a Visual Studio project. + + + + + Harvest an IIS web site. + + + + + Harvest performance counters from a category. + + + + + Harvest registry information from a reg file. + + + + + The WiX Heat runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool service. + + + + Runs the Wix Heat runner for the specified directory path. + + The directory path. + The output file. + The WiX harvest type. + The settings. + + + + Runs the Wix Heat runner for the specified directory path. + + The object files. + The output file. + The WiX harvest type. + The settings. + + + + Runs the Wix Heat runner for the specified directory path. + + The harvest target. + The output file. + The WiX harvest type. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Gets or sets the WiX extensions to use. + + + + + Gets or sets a value indicating whether [no logo]. + + + true if [no logo]; otherwise, false. + + + + + Gets or sets the suppress specific warnings. + + + The suppress specific warnings. + + + + + Gets or sets the treat specific warnings as errors. + + + The treat specific warnings as errors. + + + + + Gets or sets a value indicating whether output is verbose. + + + true if verbose; otherwise, false. + + + + + Gets or sets a value indicating whether to auto generate at compile time. + + + true if [autogenerated unique identifier]; otherwise, false. + + + + + Gets or sets a value indicating whether all components are given a guid. + + + true if [generate unique identifier]; otherwise, false. + + + + + Gets or sets the output file. + + + The output file. + + + + + Gets or sets a value indicating whether to suppress the + generation of fragments for directories and components. + + + true if [suppress fragments]; otherwise, false. + + + + + Gets or sets a value indicating whether to suppress unique identifiers + for files, components, and directories. + + + true if [suppress unique ids]; otherwise, false. + + + + + Gets or sets the transform to apply to harvested files. + + + The transform. + + + + + Gets or sets the file. + + + The file. + + + + + Gets or sets the name of the component group. + + + The name of the component group. + + + + + Gets or sets the directory reference identifier for generated directory elements. + + + The directory reference identifier. + + + + + Gets or sets the preprocessor variable. + + + The preprocessor variable. + + + + + Gets or sets a value indicating whether generate binder variables instead + of preprocessor variables. + + + true if [generate binder variables]; otherwise, false. + + + + + Gets or sets a value indicating whether the COM elements. + + + true if [suppress COM]; otherwise, false. + + + + + Gets or sets a value indicating whether [suppress registry]. + + + true if [suppress registry]; otherwise, false. + + + + + Gets or sets a value indicating whether [suppress root directory]. + + + true if [suppress root directory]; otherwise, false. + + + + + Gets or sets the configuration to set when harvesting the project. + + + The configuration. + + + + + Gets or sets the overridden directory identifier for generated directory elements. + + + The directory identifier. + + + + + Gets or sets the type of elements to generate. + + + The generate. + + + + + Gets or sets a value indicating whether to generate guids without curly braces. + + + true if generate guids without curly braces; otherwise, false. + + + + + Gets or sets a value indicating whether to keep empty directories. + + + true if keep empty directories; otherwise, false. + + + + + Gets or sets the platform to set when harvesting the project. + + + The platform. + + + + + Gets or sets the output group of Visual Studio project. + + + The output group. + + + + + Gets or sets the overridden project name to use in variables. + + + The name of the project. + + + + + Gets or sets the template to use when harvesting. + + + The template. + + + + + Gets or sets the indentation multiplier, overrides default of 4. + + + The indent. + + + + + Gets or sets a value indicating whether to suppress VB6 COM registration entries. + + + true if suppress VB6 COM registration entries; otherwise, false. + + + + + The Output Group of Visual Studio project + + + + + OutputGroup: Binaries + + + + + OutputGroup: Symbols + + + + + OutputGroup: Documents + + + + + OutputGroup: Satallites + + + + + OutputGroup: Sources + + + + + OutputGroup: Content + + + + + Template type to use for harvesting. + + + + + TemplateType: Fragment + + + + + TemplateType: Module + + + + + TemplateType: Product + + + + + The WiX Light runner. + + + + + Initializes a new instance of the class. + + The file system. + The Cake environment. + The process runner. + The tool locator. + + + + Runs Light with the specified input object files and settings. + + The object files (.wixobj). + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by the . + + + + + Gets or sets the defined WiX variables. + + + + + Gets or sets the WiX extensions to use. + + + + + Gets or sets raw command line arguments to pass through to the linker. + + + + + Gets or sets a value indicating whether to show the logo information. + + + + + Gets or sets the path to the output file (i.e. the resulting MSI package). + + + + + Contains functionality related to WiX. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the appropriate settings class: + + #tool "nuget:?package=WiX.Toolset" + + + + + + + Compiles all .wxs sources matching the specified pattern. + + + + CandleSettings settings = new CandleSettings { + Architecture = Architecture.X64, + Verbose = true + }; + WiXCandle("./src/*.wxs", settings); + + + The context. + The globbing pattern. + The settings. + + + + Compiles all .wxs sources in the provided source files. + + + + var files = GetFiles("./src/*.wxs"); + CandleSettings settings = new CandleSettings { + Architecture = Architecture.X64, + Verbose = true + }; + WiXCandle(files, settings); + + + The context. + The source files. + The settings. + + + + Links all .wixobj files matching the specified pattern. + + + + LightSettings settings = new LightSettings { + RawArguments = "-O1 -pedantic -v" + }; + WiXLight("./src/*.wixobj", settings); + + + The context. + The globbing pattern. + The settings. + + + + Links all .wixobj files in the provided object files. + + + + var files = GetFiles("./src/*.wxs"); + LightSettings settings = new LightSettings { + RawArguments = "-O1 -pedantic -v" + }; + WiXLight(files, settings); + + + The context. + The object files. + The settings. + + + + Harvests files in the provided object files. + + + + DirectoryPath harvestDirectory = Directory("./src"); + var filePath = new FilePath("Wix.Directory.wxs"); + WiXHeat(harvestDirectory, filePath, WiXHarvestType.Dir); + + + The context. + The object files. + The output file. + The WiX harvest type. + + + + Harvests files in the provided directory path. + + + + DirectoryPath harvestDirectory = Directory("./src"); + var filePath = File("Wix.Directory.wxs"); + Information(MakeAbsolute(harvestDirectory).FullPath); + WiXHeat(harvestDirectory, filePath, WiXHarvestType.Dir, new HeatSettings { NoLogo = true }); + + + The context. + The directory path. + The output file. + The WiX harvest type. + The settings. + + + + Harvests from the desired files. + + + + var harvestFile = File("./tools/Cake/Cake.Core.dll"); + var filePath = File("Wix.File.wxs"); + WiXHeat(harvestFile, filePath, WiXHarvestType.File); + + + The context. + The object files. + The output file. + The WiX harvest type. + + + + Harvests from the desired files. + + + + var harvestFiles = File("./tools/Cake/*.dll"); + var filePath = File("Wix.File.wxs"); + WiXHeat(harvestFiles, filePath, WiXHarvestType.File, new HeatSettings { NoLogo = true }); + + + The context. + The object files. + The output file. + The WiX harvest type. + The settings. + + + + Harvests files for a website or performance. + + + + var filePath = File("Wix.Website.wxs"); + WiXHeat("Default Web Site", filePath, WiXHarvestType.Website); + + + The context. + The harvest target. + The output file. + The WiX harvest type. + + + + Harvests files for a website or performance. + + + + var filePath = File("Wix.Website.wxs"); + WiXHeat("Default Web Site", filePath, WiXHarvestType.Website, new HeatSettings { NoLogo = true }); + + + The context. + The harvest target. + The output file. + The WiX harvest type. + The settings. + + + + Contains functionality related to XBuild settings. + + + + + Adds a XBuild target to the configuration. + + The settings. + The XBuild target. + The same instance so that multiple calls can be chained. + + + + Sets the tool version. + + The settings. + The version. + The same instance so that multiple calls can be chained. + + + + Adds a property to the configuration. + + The settings. + The property name. + The property values. + The same instance so that multiple calls can be chained. + + + + Sets the configuration. + + The settings. + The configuration. + The same instance so that multiple calls can be chained. + + + + Sets the build log verbosity. + + The settings. + The build log verbosity. + The same instance so that multiple calls can be chained. + + + + Represents XUnit2's options for parallel test execution + + + + + Turn off all parallelization + + + + + Only parallelize collections + + + + + Only parallelize assemblies + + + + + Parallelize assemblies and collections. + + + + + Contains functionality related to running xunit tests. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=xunit.runner.console" + + + + + + + Runs all xUnit.net v2 tests in the assemblies matching the specified pattern. + + The context. + The pattern. + + + XUnit2("./src/**/bin/Release/*.Tests.dll"); + + + + + + Runs all xUnit.net v2 tests in the assemblies matching the specified pattern. + + The context. + The pattern. + The settings. + + + XUnit2("./src/**/bin/Release/*.Tests.dll", + new XUnit2Settings { + Parallelism = ParallelismOption.All, + HtmlReport = true, + NoAppDomain = true, + OutputDirectory = "./build" + }); + + + + + + Runs all xUnit.net v2 tests in the specified assemblies. + + The context. + The assemblies. + + + XUnit2(new []{ + "./src/Cake.Common.Tests/bin/Release/Cake.Common.Tests.dll", + "./src/Cake.Core.Tests/bin/Release/Cake.Core.Tests.dll", + "./src/Cake.NuGet.Tests/bin/Release/Cake.NuGet.Tests.dll", + "./src/Cake.Tests/bin/Release/Cake.Tests.dll" + }); + + + + + + Runs all xUnit.net tests in the specified assemblies. + + The context. + The assemblies. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + XUnit2(testAssemblies); + + + + + + Runs all xUnit.net v2 tests in the specified assemblies. + + The context. + The assemblies. + The settings. + + + XUnit2(new []{ + "./src/Cake.Common.Tests/bin/Release/Cake.Common.Tests.dll", + "./src/Cake.Core.Tests/bin/Release/Cake.Core.Tests.dll", + "./src/Cake.NuGet.Tests/bin/Release/Cake.NuGet.Tests.dll", + "./src/Cake.Tests/bin/Release/Cake.Tests.dll" + }, + new XUnit2Settings { + Parallelism = ParallelismOption.All, + HtmlReport = true, + NoAppDomain = true, + OutputDirectory = "./build" + }); + + + + + + Runs all xUnit.net v2 tests in the specified assemblies. + + The context. + The assemblies. + The settings. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + XUnit2(testAssemblies, + new XUnit2Settings { + Parallelism = ParallelismOption.All, + HtmlReport = true, + NoAppDomain = true, + OutputDirectory = "./build" + }); + + + + + + Contains functionality related to XUnit2 settings. + + + + + Adds a trait to the settings, to include in test execution. + + The settings. + The trait name. + The trait values. + The same instance so that multiple calls can be chained. + + + + Adds a trait to the settings, to exclude in test execution. + + The settings. + The trait name. + The trait values. + The same instance so that multiple calls can be chained. + + + + Contains functionality related to running xunit tests. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=xunit.runners&version=1.9.2" + + + + + + + Runs all xUnit.net tests in the assemblies matching the specified pattern. + + The context. + The pattern. + + + XUnit("./src/**/bin/Release/*.Tests.dll"); + + + + + + Runs all xUnit.net tests in the assemblies matching the specified pattern. + + The context. + The pattern. + The settings. + + + XUnit("./src/**/bin/Release/*.Tests.dll", + new XUnitSettings { + HtmlReport = true, + OutputDirectory = "./build" + }); + + + + + + Runs all xUnit.net tests in the specified assemblies. + + The context. + The assemblies. + + + XUnit(new []{ + "./src/Cake.Common.Tests/bin/Release/Cake.Common.Tests.dll", + "./src/Cake.Core.Tests/bin/Release/Cake.Core.Tests.dll", + "./src/Cake.NuGet.Tests/bin/Release/Cake.NuGet.Tests.dll", + "./src/Cake.Tests/bin/Release/Cake.Tests.dll" + }); + + + + + + Runs all xUnit.net tests in the specified assemblies. + + The context. + The assemblies. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + XUnit(testAssemblies); + + + + + + Runs all xUnit.net tests in the specified assemblies. + + The context. + The assemblies. + The settings. + + + XUnit(new []{ + "./src/Cake.Common.Tests/bin/Release/Cake.Common.Tests.dll", + "./src/Cake.Core.Tests/bin/Release/Cake.Core.Tests.dll", + "./src/Cake.NuGet.Tests/bin/Release/Cake.NuGet.Tests.dll", + "./src/Cake.Tests/bin/Release/Cake.Tests.dll" + }, + new XUnitSettings { + HtmlReport = true, + OutputDirectory = "./build" + }); + + + + + + Runs all xUnit.net tests in the specified assemblies. + + The context. + The assemblies. + The settings. + + + var testAssemblies = GetFiles("./src/**/bin/Release/*.Tests.dll"); + XUnit(testAssemblies, + new XUnitSettings { + HtmlReport = true, + OutputDirectory = "./build" + }); + + + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether tests should be run as a shadow copy. + Default value is true. + + + true if tests should be run as a shadow copy; otherwise, false. + + + + + Gets or sets the output directory. + + The output directory. + + + + Gets or sets a value indicating whether an XML report should be generated. + + + true if an XML report should be generated; otherwise, false. + + + + + Gets or sets a value indicating whether an HTML report should be generated. + + + true if an HTML report should be generated; otherwise, false. + + + + + Gets or sets a value indicating whether or not output running test count. + + + true if running test count should be outputted; otherwise, false. + + + + + The xUnit.net (v1) test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The runner. + The tool locator. + + + + Runs the tests in the specified assembly. + + The assembly path. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + The xUnit.net v2 test runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The runner. + The tool locator. + + + + Runs the tests in the specified assembly. + + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether tests should be run as a shadow copy. + Default value is true. + + + true if tests should be run as a shadow copy; otherwise, false. + + + + + Gets or sets the output directory. + + The output directory. + + + + Gets or sets a value indicating whether an NUnit style XML report should be generated. + + + true if an NUnit Style XML report should be generated; otherwise, false. + + + + + Gets or sets a value indicating whether an XML report should be generated. + + + true if an XML report should be generated; otherwise, false. + + + + + Gets or sets a value indicating whether an xUnit.net v1 style XML report should be generated. + + + + + Gets or sets a value indicating whether an HTML report should be generated. + + + true if an HTML report should be generated; otherwise, false. + + + + + Gets or sets a value indicating whether to not use app domains to run test code. + + + true to not use app domains to run test code; otherwise, false. + + + + + Gets or sets the parallelism option. + Corresponds to the -parallel command line switch. + + + The parallelism option. + + + + + Gets or sets the maximum thread count for collection parallelization. + + + null (default); + 0: run with unbounded thread count; + >0: limit task thread pool size to value; + + value < 0 + + + + Gets the traits to include. + + + Only run tests with matching name/value traits. + If more than one is specified, it acts as an OR operation. + + + The traits to include. + + + + + Gets the traits to exclude. + + + Do not run tests with matching name/value traits. + If more than one is specified, it acts as an AND operation. + + + The traits to exclude. + + + + + Contains functionality related to XML XSL transformation. + + + + + Set the value of, or remove, target nodes. + + The context. + The target file. + The xpath of the nodes to set. + The value to set too. Leave blank to remove the selected nodes. + + + Change the server setting in the configuration from testhost.somecompany.com + to productionhost.somecompany.com. + + XML file: + + + + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/configuration/appSettings/add[@key = 'server']/@value", "productionhost.somecompany.com"); + }); + ]]> + + + + + Modify the noNamespaceSchemaLocation in an XML file. + + XML file: + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/Commands/@xsi:noNamespaceSchemaLocation", "d:\\Commands.xsd", new XmlPokeSettings { + Namespaces = new Dictionary { + { /* Prefix */ "xsi", /* URI */ "http://www.w3.org/2001/XMLSchema-instance" } + } + }); + }); + ]]> + + + + Remove an app setting from a config file. + + XML file: + + + + + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/configuration/appSettings/add[@testing]", null); + }); + ]]> + + + + Credit to NAnt for the original example. + http://nant.sourceforge.net/release/latest/help/tasks/xmlpoke.html + + + + + + Set the value of, or remove, target nodes. + + The context. + The target file. + The xpath of the nodes to set. + The value to set too. Leave blank to remove the selected nodes. + Additional settings to tweak Xml Poke behavior. + + + Change the server setting in the configuration from testhost.somecompany.com + to productionhost.somecompany.com. + + XML file: + + + + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/configuration/appSettings/add[@key = 'server']/@value", "productionhost.somecompany.com"); + }); + ]]> + + + + + Modify the noNamespaceSchemaLocation in an XML file. + + XML file: + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/Commands/@xsi:noNamespaceSchemaLocation", "d:\\Commands.xsd", new XmlPokeSettings { + Namespaces = new Dictionary { + { /* Prefix */ "xsi", /* URI */ "http://www.w3.org/2001/XMLSchema-instance" } + } + }); + }); + ]]> + + + + Remove an app setting from a config file. + + XML file: + + + + + + + + + ]]> + + Cake Task: + + + { + var file = File("test.xml"); + XmlPoke(file, "/configuration/appSettings/add[@testing]", null); + }); + ]]> + + + + Credit to NAnt for the original example. + http://nant.sourceforge.net/release/latest/help/tasks/xmlpoke.html + + + + + + Set the value of, or remove, target nodes. + + The context. + The source xml to transform. + The xpath of the nodes to set. + The value to set too. Leave blank to remove the selected nodes. + Resulting XML. + + + Change the server setting in the configuration from testhost.somecompany.com + to productionhost.somecompany.com. + + XML string: + + + + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/configuration/appSettings/add[@key = 'server']/@value", "productionhost.somecompany.com"); + }); + ]]> + + + + + Modify the noNamespaceSchemaLocation in an XML file. + + XML string: + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/Commands/@xsi:noNamespaceSchemaLocation", "d:\\Commands.xsd", new XmlPokeSettings { + Namespaces = new Dictionary { + { /* Prefix */ "xsi", /* URI */ "http://www.w3.org/2001/XMLSchema-instance" } + } + }); + }); + ]]> + + + + Remove an app setting from a config file. + + XML string: + + + + + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/configuration/appSettings/add[@testing]", null); + }); + ]]> + + + + Credit to NAnt for the original example. + http://nant.sourceforge.net/release/latest/help/tasks/xmlpoke.html + + + + + + Set the value of, or remove, target nodes. + + The context. + The source xml to transform. + The xpath of the nodes to set. + The value to set too. Leave blank to remove the selected nodes. + Additional settings to tweak Xml Poke behavior. + Resulting XML. + + + Change the server setting in the configuration from testhost.somecompany.com + to productionhost.somecompany.com. + + XML string: + + + + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/configuration/appSettings/add[@key = 'server']/@value", "productionhost.somecompany.com"); + }); + ]]> + + + + + Modify the noNamespaceSchemaLocation in an XML file. + + XML string: + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/Commands/@xsi:noNamespaceSchemaLocation", "d:\\Commands.xsd", new XmlPokeSettings { + Namespaces = new Dictionary { + { /* Prefix */ "xsi", /* URI */ "http://www.w3.org/2001/XMLSchema-instance" } + } + }); + }); + ]]> + + + + Remove an app setting from a config file. + + XML string: + + + + + + + + + ]]> + + Cake Task: + + + { + var result = XmlPokeString(xmlString, "/configuration/appSettings/add[@testing]", null); + }); + ]]> + + + + Credit to NAnt for the original example. + http://nant.sourceforge.net/release/latest/help/tasks/xmlpoke.html + + + + + + Set the value of, or remove, target nodes. + + The source xml to transform. + The destination to write too. + The xpath of the nodes to set. + The value to set too. Leave blank to remove the selected nodes. + Additional settings to tweak Xml Poke behavior. + + + + Gets a XmlReaderSettings from a XmlPokeSettings + + The xml reader settings. + Additional settings to tweak Xml Poke behavior. + + + + Contains settings for + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to preserve white space. + + + + + Gets or sets namespaces to include for xpath recognition. + + + + + Gets or sets the type of text encoding to use. + + + + + Gets or sets a value that determines the processing of DTDs. + + + + + Provides functionality to perform XML transformation + + + + + Performs XML XSL transformation + + XML style sheet. + XML data. + Transformed XML string. + + + + Performs XML XSL transformation + + XML style sheet. + XML data. + Settings for result file xml transformation. + Transformed XML string. + + + + Performs XML XSL transformation + + The file system. + Path to xml style sheet. + Path xml data. + Transformation result path. + + + + Performs XML XSL transformation + + The file system. + Path to xml style sheet. + Path xml data. + Transformation result path. + Settings for result file xml transformation. + + + + Performs XML XSL transformation + + XML style sheet. + XML data. + Transformation result. + Optional settings for result file xml writer + + + + Performs XML XSL transformation + + XML style sheet. + XML data. + Transformation result. + + + + Contains functionality related to XML XSL transformation. + + + + + Performs XML XSL transformation + + The context. + XML style sheet. + XML data. + Transformed XML string. + + + This example code will convert xml to a new xml strucure using XmlTransform alias. + + + + + + + + "; + + string xml = @" + + + "; + + var priceTag = XmlTransform(xsl, xml); + ]]> + + Result: + + 1.62]]> + + + + + + Performs XML XSL transformation + + The context. + XML style sheet. + XML data. + Optional settings for result file xml writer + Transformed XML string. + + + This example code will convert specific part of xml to plaintext using XmlTransform alias. + + + + + "; + + string xml = @" + + + "; + + var text = XmlTransform(xsl, xml, new XmlTransformationSettings { + ConformanceLevel = System.Xml.ConformanceLevel.Fragment, Encoding = Encoding.ASCII }); + ]]> + + + + + + Performs XML XSL transformation + + The context. + Path to xml style sheet. + Path xml data. + Transformation result path, will overwrite if exists. + + + This example code will convert the Cake nuspec into html using the XmlTransform alias. + XML stylesheet: + + + + + + + + <xsl:for-each select="package/p:metadata"> + <xsl:value-of select="p:id"/> + </xsl:for-each> + + + + +

+ +

+

Description

+ +
+

Files

+
    + +
  • +
    +
+ + +
+
+ ]]> +
+ XmlTransform usage: + + XmlTransform("./nuspec.xsl", "./nuspec/Cake.nuspec", "./Cake.htm"); + +
+
+ + + Performs XML XSL transformation + + The context. + Path to xml style sheet. + Path xml data. + Transformation result path. + Optional settings for result file xml writer + + + This example code will convert the Cake nuspec into html using the XmlTransform alias, + specifying that result should be indented and using Unicode encoding. + XML stylesheet: + + + + + + + + <xsl:for-each select="package/p:metadata"> + <xsl:value-of select="p:id"/> + </xsl:for-each> + + + + +

+ +

+

Description

+ +
+

Files

+
    + +
  • +
    +
+ + +
+
+ ]]> +
+ XmlTransform usage: + + XmlTransform("./nuspec.xsl", "./nuspec/Cake.nuspec", "./Cake.htm", + new XmlTransformationSettings { Indent = true, Encoding = Encoding.Unicode}); + +
+
+ + + Contains settings for + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether overwriting existing file is permitted + + + + + Gets or sets a value indicating whether the XML writer should check to ensure that all characters in the document conform to the "2.2 Characters" section of the W3C XML 1.0 Recommendation. + + + + + Gets or sets a value indicating level of conformance that the XmlWriter checks the XML output for. + + + + + Gets or sets a value indicating whether the XmlWriter does not escape URI attributes. + + + + + Gets or sets the type of text encoding to use. + + + + + Gets or sets a value indicating whether to indent elements. + + + + + Gets or sets the character string to use when indenting. This setting is used when the Indent property is set to true. + + + + + Gets or sets a value that indicates whether the XmlWriter should remove duplicate namespace declarations when writing XML content. The default behavior is for the writer to output all namespace declarations that are present in the writer's namespace resolver. + + + + + Gets or sets the character string to use for line breaks. + + + + + Gets or sets a value indicating whether to normalize line breaks in the output. + + + + + Gets or sets a value indicating whether to write attributes on a new line. + + + + + Gets or sets a value indicating whether to omit an XML declaration. + + + + + Gets or sets a value indicating whether the XmlWriter will add closing tags to all unclosed element tags when the Close method is called + + + + + Contains functionality related to HTTP operations + + + + + Downloads the specified resource over HTTP to a temporary file. + + + + var resource = DownloadFile("http://www.example.org/index.html"); + + + The context. + The URL of the resource to download. + The path to the downloaded file. + + + + Downloads the specified resource over HTTP to a temporary file. + + + + var address = new Uri("http://www.example.org/index.html"); + var resource = DownloadFile(address); + + + The context. + The URL of file to download. + The path to the downloaded file. + + + + Downloads the specified resource over HTTP to the specified output path. + + + + DownloadFile("http://www.example.org/index.html", "./outputdir"); + + + The context. + The URL of the resource to download. + The output path. + + + + Downloads the specified resource over HTTP to the specified output path. + + + + var address = new Uri("http://www.example.org/index.html"); + DownloadFile(address, "./outputdir"); + + + The context. + The URL of the resource to download. + The output path. + + + + Uploads the specified file via a HTTP POST to the specified uri using multipart/form-data. + + + + var address = new Uri("http://www.example.org/upload"); + UploadFile(address, @"path/to/file.txt"); + + + The context. + The URL of the upload resource. + The file to upload. + + + + Uploads the specified file via a HTTP POST to the specified uri using multipart/form-data. + + + + var address = "http://www.example.org/upload"; + UploadFile(address, @"path/to/file.txt"); + + + The context. + The URL of the upload resource. + The file to upload. + + + + Uploads the specified byte array via a HTTP POST to the specified uri using multipart/form-data. + + + + var address = new Uri("http://www.example.org/upload"); + UploadFile(address, @"path/to/file.txt"); + + + The context. + The URL of the upload resource. + The data to upload. + The filename to give the uploaded data + + + + Uploads the specified byte array via a HTTP POST to the specified uri using multipart/form-data. + + + + var address = "http://www.example.org/upload"; + UploadFile(address, @"path/to/file.txt"); + + + The context. + The URL of the upload resource. + The data to upload. + The filename to give the uploaded data + + + + Contains settings used by . + + + + + Initializes a new instance of the class. + + + + + Gets the targets. + + The targets. + + + + Gets the properties. + + The properties. + + + + Gets or sets the tool version. + + The tool version. + + + + Gets or sets the configuration. + + The configuration. + + + + Gets or sets the amount of information to display in the build log. + Each logger displays events based on the verbosity level that you set for that logger. + + The build log verbosity. + + + + The XBuild runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The runner. + The tool locator. + + + + Runs XBuild with the specified settings. + + The solution to build. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Represents a XBuild tool version. + + + + + The highest available XBuild tool version. + + + + + XBuild tool version: .NET 2.0 + + + + + XBuild tool version: .NET 3.0 + + + + + XBuild tool version: .NET 3.5 + + + + + XBuild tool version: .NET 4.0 + + + + + Contains functionality related to XBuild. + + In order to use the commands for this alias, XBuild (which is part of Mono) will already have to be installed on the machine the + Cake Script is being executed. + + + + + + Builds the specified solution using XBuild. + + The context. + The solution to build. + + + XBuild("./src/Cake.sln"); + + + + + + Builds the specified solution using XBuild. + + The context. + The solution to build. + The settings configurator. + + + XBuild("./src/Cake.sln", configurator => + configurator.SetConfiguration("Debug") + .SetVerbosity(Verbosity.Minimal) + .UseToolVersion(XBuildToolVersion.NET40)); + + + + + + Builds the specified solution using XBuild. + + The context. + The solution to build. + The settings. + + + XBuild("./src/Cake.sln", new XBuildSettings { + Verbosity = Verbosity.Minimal, + ToolVersion = XBuildToolVersion.NET40, + Configuration = "Release" + }); + + + + + + Contains settings used by the DotNetBuild alias. + + + + + Initializes a new instance of the class. + + The solution. + + + + Gets the solution path. + + The solution. + + + + Gets the targets. + + The targets. + + + + Gets the properties. + + The properties. + + + + Gets or sets the configuration. + + The configuration. + + + + Gets or sets the amount of information to display in the build log. + Each logger displays events based on the verbosity level that you set for that logger. + + The build log verbosity. + + + + Contains functionality to run either MSBuild on Windows or XBuild on Mac/Linux/Unix. + + + + + Builds the specified solution using MSBuild or XBuild. + + + + DotNetBuild("./project/project.sln"); + + + The context. + The solution. + + + + Builds the specified solution using MSBuild or XBuild. + + + + DotNetBuild("./project/project.sln", settings => + settings.SetConfiguration("Debug") + .SetVerbosity(Core.Diagnostics.Verbosity.Minimal) + .WithTarget("Build") + .WithProperty("TreatWarningsAsErrors","true")); + + + The context. + The solution. + The configurator. + + + + Contains settings used by . + + + + + Gets or sets a keyfile to sign the output assembly + + The keyfile. + + + + Gets or sets a file to enable logging to (no logging if null or empty) + + The log file. + + + + Gets or sets the target assembly version. + + The version. + + + + Gets or sets a value indicating whether to merge types with identical names into one + + true if types with identical names should be merged into one; otherwise, false. + + + + Gets or sets a value indicating whether to disable symbol file generation + + true if debug symbols should be disabled; otherwise, false. + + + + Gets or sets a value indicating whether to copy assembly attributes (by default only the primary assembly attributes are copied) + + true if assembly attributes should be copied; otherwise, false. + + + + Gets or sets the assembly file to take attributes from + + The assembly file to take attributes from. + + + + Gets or sets a value indicating whether to allow multiple attributes (if type allows) + + true if multiple attributes should be allowed; otherwise, false. + + + + Gets or sets the specify target assembly kind (library, exe, winexe supported, default is same as first assembly) + + The kind of the target assembly to create. + + + + Gets or sets the target platform (v1, v1.1, v2, v4 supported) + + The target platform. + + + + Gets or sets a value indicating whether to merge XML documentation as well + + true if xml documents should be merged; otherwise, false. + + + + Gets or sets the paths to search directories for referenced assemblies (can be specified multiple times) + + The libs. + + + + Gets or sets a value indicating whether to set all types but the ones from the first assembly 'internal' + + + true if types in assemblies other than the primary assembly should + have their visibility modified to internal; otherwise, false. + + + + + Gets or sets a value indicating whether to set the key, but don't sign the assembly + + true if assembly should be delay signed; otherwise, false. + + + + Gets or sets the specified type for being duplicated in input assemblies + + The type to allow duplication of. + + + + Gets or sets a value indicating whether to duplicate resources in output assembly (by default they're ignored) + + true if duplicate resources should be allowed in the output assembly; otherwise, false. + + + + Gets or sets a value indicating whether to allow assemblies with Zero PeKind (but obviously only IL will get merged) + + true if assemblies with Zero PeKind should be allowed; otherwise, false. + + + + Gets or sets a value indicating whether to allow (and resolve) file wildcards (e.g. `*`.dll) in input assemblies + + true if file wildcards should be allowed in input assembly paths; otherwise, false. + + + + Gets or sets a value indicating whether to use as many CPUs as possible to merge the assemblies + + true if merging should use as many CPUs as possible in parallel; otherwise, false. + + + + Gets or sets a value indicating whether to pause execution once completed (good for debugging) + + true if execution should pause once completed; otherwise, false. + + + + Gets or sets a value indicating whether to show more logs + + true if more logs should be output during execution; otherwise, false. + + + + The ILMerge runner. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Merges the specified assemblies. + + The output assembly path. + The primary assembly path. + The assembly paths. + The settings. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the name of the tool executable. + + The tool executable name. + + + + Contains functionality related to ILRepack. + + In order to use the commands for this alias, include the following in your build.cake file to download and + install from NuGet.org, or specify the ToolPath within the class: + + #tool "nuget:?package=ILRepack" + + + + + + + Merges the specified assemblies. + + The context. + The output file. + The primary assembly. + The assembly paths. + + + var assemblyPaths = GetFiles("./**/Cake.*.dll"); + ILRepack("./MergedCake.exe", "./Cake.exe", assemblyPaths); + + + + + + Merges the specified assemblies. + + The context. + The output file. + The primary assembly. + The assembly paths. + The settings. + + + var assemblyPaths = GetFiles("./**/Cake.*.dll"); + ILRepack( + "./MergedCake.exe", + "./Cake.exe", + assemblyPaths, + new ILRepackSettings { Internalize = true }); + + + + + + Provides Bamboo project information for a current build. + + + + + Initializes a new instance of the class. + + The environment. + + + + Gets the Bamboo Plan Name + + + The Bamboo Plan Name. + + + + + Gets the Bamboo short Plan Name + + + The Bamboo Plan Name in it's short form. + + + + + Gets the key of the current plan, in the form PROJECT-PLAN, e.g. BAM-MAIN + + + The project name. + + + + + Gets the Bamboo short Plan Key. + + + The Bamboo Plan Key in it's hort form. + + + + + Gets the Bamboo short job key. + + + The Bamboo job key in it's short form. + + + + + Gets the Bamboo short Job Name. + + + The Bamboo Job Name in it's short form. + + + + + Contains functionality related to XML XPath queries. + + + + + Gets the value of a target node. + + The value found at the given XPath query. + The context. + The target file. + The xpath of the node to get. + + + string autoFacVersion = XmlPeek("./src/Cake/packages.config", "/packages/package[@id='Autofac']/@version"); + + + + + + Get the value of a target node. + + The value found at the given XPath query. + The context. + The target file. + The xpath of the nodes to set. + Additional settings to tweak Xml Peek behavior. + + + XML document: + + + < cake price="1.62" /> + + ]]> + + XmlPeek usage: + + string version = XmlPeek("./pastery.xml", "/pastery:pastery/pastery:cake/@price", + new XmlPeekSettings { + Namespaces = new Dictionary<string, string> {{ "pastery", "http://cakebuild.net/pastery" }} + }); + + + + + + Gets the value of a target node. + + The value found at the given XPath query (or the first, if multiple eligible nodes are found). + The source xml to transform. + The xpath of the nodes to set. + Additional settings to tweak Xml Peek behavior. + + + + Gets a XmlReaderSettings from a XmlPeekSettings + + The xml reader settings. + Additional settings to tweak Xml Peek behavior. + + + + Contains settings for + + + + + Initializes a new instance of the class. + + + + + Gets or sets namespaces to include for xpath recognition. + + + + + Gets or sets a value indicating whether to preserve white space. + + + + + Gets or sets a value that determines the processing of DTDs. + + + + + Speficies how will an XmlReader handle DTDs in the XML document. + + + + + The XmlReader will throw an exception when it finds a 'DOCTYPE' markup. + + + + + The DTD will be ignored. Any reference to a general entity in the XML document + will cause an exception (except for the predefined entities < > & " and '). + The DocumentType node will not be reported. + + + + + The DTD will be parsed and fully processed (entities expanded, default attributes added etc.) + + +
+
diff --git a/Build/tools/Cake/Cake.Core.dll b/Build/tools/Cake/Cake.Core.dll new file mode 100644 index 00000000..df90519b Binary files /dev/null and b/Build/tools/Cake/Cake.Core.dll differ diff --git a/Build/tools/Cake/Cake.Core.xml b/Build/tools/Cake/Cake.Core.xml new file mode 100644 index 00000000..c40ae3ac --- /dev/null +++ b/Build/tools/Cake/Cake.Core.xml @@ -0,0 +1,4940 @@ + + + + Cake.Core + + + + + A task that executes a specified delegate. + + + + + A represents a unit of work. + + + + + Provides descriptive properties about a cake task + + + + + Gets the name of the task. + + The name of the task. + + + + Gets the description of the task. + + The description of the task. + + + + Gets the task's dependencies. + + The task's dependencies. + + + + Initializes a new instance of the class. + + The name of the task. + + + + Adds a dependency to the task. + + The name of the dependency. + + + + Adds a criteria to the task that is invoked when the task is invoked. + + The criteria. + + + + Sets the error handler for the task. + The error handler is invoked when an exception is thrown from the task. + + The error handler. + + + + Sets the error reporter for the task. + The error reporter is invoked when an exception is thrown from the task. + This action is invoked before the error handler, but gives no opportunity to recover from the error. + + The error reporter. + is null. + There can only be one error reporter per task. + + + + Sets the finally handler for the task. + The finally handler is always invoked when a task have finished running. + + The finally handler. + + + + Executes the task using the specified context. + + The context. + + + + Gets the name of the task. + + The name of the task. + + + + Gets or sets the description of the task. + + The description of the task. + + + + Gets the task's dependencies. + + The task's dependencies. + + + + Gets the task's criterias. + + The task's criterias. + + + + Gets the error handler. + + The error handler. + + + + Gets the error reporter. + + + + + Gets the finally handler. + + + + + Initializes a new instance of the class. + + The name of the task. + + + + Adds an action to the task. + + The action. + + + + Executes the task using the specified context. + + The context. + + + + Gets the task's actions. + + The task's actions. + + + + An attribute used to mark script aliases. + + + + + An attribute used for documentation of alias methods/properties. + + + + + Initializes a new instance of the class. + + The category name. + + + + Gets the category name. + + The category name. + + + + An attribute used to hint Cake about additional namespaces that need + to be imported for an alias to work. This attribute can mark an + extension method or the extension method class. + + + + + Initializes a new instance of the class. + + The namespace. + + + + Gets the namespace. + + The namespace. + + + + An attribute used to mark script property aliases. + + + + + Gets or sets a value indicating whether the result of the property alias method should be cached. + Indicates . + + + true if cache; otherwise, false. + + + + + An attribute used to identify a module implementation in an assembly. + + + + + Initializes a new instance of the class. + + The module type. + + + + Gets the module type. + + The module type. + + + + Adapter to ensure correct conversion of Cake Context in derived classes. + + + + + Initializes a new instance of the class. + + The Cake Context + + + + Gets the file system. + + + The file system. + + + + + Gets the environment. + + + The environment. + + + + + Gets the globber. + + + The globber. + + + + + Gets the log. + + + The log. + + + + + Gets the arguments. + + + The arguments. + + + + + Gets the process runner. + + + The process runner. + + + + + Gets the registry. + + + The registry. + + + + + Gets the tool locator. + + + The tool locator. + + + + + Represents the platform that Cake is running on. + + + + + Represents the platform that Cake is running on. + + + + + Gets the platform family. + + The platform family. + + + + Gets a value indicating whether or not the current operative system is 64 bit. + + + true if current operative system is 64 bit; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Gets the platform family. + + The platform family. + + + + Gets a value indicating whether or not the current platform is 64 bit. + + + true if current platform is 64 bit; otherwise, false. + + + + + Represents the runtime that Cake is running in. + + + + + Represents the runtime that Cake is running in. + + + + + Gets the target .NET framework version that the current AppDomain is targeting. + + The target framework. + + + + Gets the version of Cake executing the script. + + The Cake.exe version. + + + + Initializes a new instance of the class. + + + + + Gets the target .NET framework version that the current AppDomain is targeting. + + + + + Gets the version of Cake executing the script. + + + + + Represents a container registry used to register types and instances with Cake. + + + + + Registers the specified module with the container registry. + + The module to register. + + + + Registers a type with the container registry. + + The implementation type to register. + A registration builder used to configure the registration. + + + + Registers an instance with the container registry. + + The instance type. + The instance to register. + A registration builder used to configure the registration. + + + + Represents a registration builder for a specific type. + + The type to configure. + + + + Adds a registration type to the configuration. + + The registration type. + The same instance so that multiple calls can be chained. + + + + Adds a registration type that matches the implementation type. + + The same instance so that multiple calls can be chained. + + + + Configure the component so that every dependent component + gets the same, shared instance. This is the default lifetime scope. + + The same instance so that multiple calls can be chained. + + + + Configure the component so that every dependent component + gets a new, unique instance. + + The same instance so that multiple calls can be chained. + + + + Represents a module responsible for + registering types and instances. + + + + + Performs custom registrations in the provided registry. + + The container registry. + + + + Implementation of . + + + + + Represents a context for scripts and script aliases. + + + + + Gets the file system. + + The file system. + + + + Gets the environment. + + The environment. + + + + Gets the globber. + + The globber. + + + + Gets the log. + + The log. + + + + Gets the arguments. + + The arguments. + + + + Gets the process runner. + + The process runner. + + + + Gets the registry. + + The registry. + + + + Gets the tool locator. + + The tool locator. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The globber. + The log. + The arguments. + The process runner. + The registry. + The tool locator. + + + + Gets the file system. + + + The file system. + + + + + Gets the environment. + + + The environment. + + + + + Gets the globber. + + + The globber. + + + + + Gets the log. + + + The log. + + + + + Gets the arguments. + + + The arguments. + + + + + Gets the process runner. + + + The process runner. + + + + + Gets the registry. + + + The registry. + + + + + Gets the tool locator. + + + The tool locator. + + + + + The Cake execution engine. + + + + + Represents the Cake engine. + + + + + Registers a new task. + + The name of the task. + A . + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + + Runs the specified target using the specified . + + The context. + The execution strategy. + The target to run. + The resulting report. + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, the task will not be executed but the task's teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Gets all registered tasks. + + The registered tasks. + + + + Initializes a new instance of the class. + + The log. + + + + Creates and registers a new . + + The name of the task. + + A used to configure the task. + + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + + Runs the specified target. + + The context. + The execution strategy. + The target to run. + The resulting report. + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, the task will not be executed but the task's teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Gets all registered tasks. + + The registered tasks. + + + + Represent errors that occur during script execution. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Contains information about tasks that were executed in a script. + + + + + Initializes a new instance of the class. + + + + + Adds a task result to the report. + + The task. + The span. + + + + Adds a skipped task result to the report. + + The task. + + + + Adds a delegated task result to the report. + + The task. + The span. + + + + Adds a task result to the report. + + The task. + The span. + The execution status. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets a value indicating whether the report is empty. + + + true if this report is empty; otherwise, false. + + + + + An attribute used to mark script method aliases. + + + + + Represents an entry in a . + + + + + Initializes a new instance of the class. + + The name of the task. + The duration. + + + + Initializes a new instance of the class. + + The name of the task. + The duration. + The execution status. + + + + Gets the task name. + + The name. + + + + Gets the duration the task ran for. + + The duration the task ran for. + + + + Gets the task execution status. + + The execution status. + + + + Allows configuration to be performed for a registered . + + The task type. + + + + Initializes a new instance of the class. + + The task. + + + + Gets the task being configured. + + The task being configured. + + + + Contains extension methods for . + + + + + Creates a dependency between two tasks. + + The task type. + The task builder. + The name of the dependent task. + The same instance so that multiple calls can be chained. + + + + Adds a criteria that has to be fulfilled for the task to run. + + The task type. + The task builder. + The criteria. + The same instance so that multiple calls can be chained. + + + + Adds a criteria that has to be fulfilled for the task to run. + The criteria is evaluated when traversal of the graph occurs. + + The task type. + The task builder. + The criteria. + The same instance so that multiple calls can be chained. + + + + Adds a criteria that has to be fulfilled for the task to run. + The criteria is evaluated when traversal of the graph occurs. + + The task type. + The task builder. + The criteria. + The same instance so that multiple calls can be chained. + + + + Adds an action to be executed when the task is invoked. + + The task builder. + The action. + The same instance so that multiple calls can be chained. + + + + Adds an action to be executed when the task is invoked. + + The task builder. + The action. + The same instance so that multiple calls can be chained. + + + + Adds a description to the task. + + The task type. + The task builder. + The description. + The same instance so that multiple calls can be chained. + + + + Adds an indication to the task that a thrown exception will not halt the script execution. + + The task builder. + The same instance so that multiple calls can be chained. + + + + Adds an error handler to be executed if an exception occurs in the task. + + The task type. + The builder. + The error handler. + The same instance so that multiple calls can be chained. + + + + Adds an error handler to be executed if an exception occurs in the task. + + The task type. + The builder. + The error handler. + The same instance so that multiple calls can be chained. + + + + Adds a finally handler to be executed after the task have finished executing. + + The task type. + The builder. + The finally handler. + The same instance so that multiple calls can be chained. + + + + Adds an error reporter for the task to be executed when an exception is thrown from the task. + This action is invoked before the error handler, but gives no opportunity to recover from the error. + + The task type. + The builder. + The finally handler. + The same instance so that multiple calls can be chained. + + + + The execution status of a . + + + + + The task was executed. + + + + + The task delegated execution. + + + + + The task was skipped. + + + + + Contains extension methods for . + + + + + Adds a criteria to the task that is invoked when the task is invoked. + + The task. + The criteria. + + + + Represents the Cake configuration. + + + + + Gets the value that corresponds to the specified key. + + The key. + The value for the specified key, or null if key doesn't exists. + + + + Implementation of the Cake configuration provider. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Creates a configuration from the provided arguments. + + The directory to look for the configuration file. + The arguments. + The created configuration. + + + + The default execution strategy. + + + + + Represents a task execution strategy. + + + + + Performs the setup. + + The action. + The context. + + + + Performs the teardown. + + The action. + The context. + + + + Executes the specified task. + + The task to execute. + The context. + + + + Skips the specified task. + + The task to skip. + + + + Executes the error reporter. + + The action. + The exception. + + + + Executes the error handler. + + The action. + The exception. + + + + Invokes the finally handler. + + The action. + + + + Performs the specified setup action before each task is invoked. + + The action. + The context. + + + + Performs the specified teardown action after each task is invoked. + + The action. + The context. + + + + Initializes a new instance of the class. + + The log. + + + + Performs the setup. + + The action. + The context. + + + + Performs the teardown. + + The action. + The context. + + + + Executes the specified task. + + The task to execute. + The context. + + + + Skips the specified task. + + The task to skip. + + + + Executes the error reporter. + + The action. + The exception. + + + + Executes the error handler. + + The action. + The exception. + + + + Invokes the finally handler. + + The action. + + + + Performs the specified setup action before each task is invoked. + + The action. + The context. + + + + Performs the specified teardown action after each task is invoked. + + The action. + The context. + + + + Represents a log. + + + + + Writes the text representation of the specified array of objects to the + log using the specified verbosity, log level and format information. + + The verbosity. + The log level. + A composite format string. + An array of objects to write using format. + + + + Gets or sets the verbosity. + + The verbosity. + + + + Delegate representing lazy log action. + + Proxy to log. + + + + Delegate representing lazy log entry. + + A composite format string. + An array of objects to write using format. + + + + Contains extension methods for . + + + + + Writes an error message to the log using the specified format information. + + The log. + A composite format string. + An array of objects to write using format. + + + + Writes an error message to the log using the specified verbosity and format information. + + The log. + The verbosity. + A composite format string. + An array of objects to write using format. + + + + Writes an error message to the log using the specified verbosity and log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log action. + + + + Writes an error message to the log using the specified log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The log action. + + + + Writes a warning message to the log using the specified format information. + + The log. + A composite format string. + An array of objects to write using format. + + + + Writes a warning message to the log using the specified verbosity and format information. + + The log. + The verbosity. + A composite format string. + An array of objects to write using format. + + + + Writes a warning message to the log using the specified log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The log action. + + + + Writes a warning message to the log using the specified verbosity and log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log action. + + + + Writes an informational message to the log using the specified format information. + + The log. + A composite format string. + An array of objects to write using format. + + + + Writes an informational message to the log using the specified verbosity and format information. + + The log. + The verbosity. + A composite format string. + An array of objects to write using format. + + + + Writes an informational message to the log using the specified verbosity and log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log action. + + + + Writes an informational message to the log using the specified log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The log action. + + + + Writes a verbose message to the log using the specified format information. + + The log. + A composite format string. + An array of objects to write using format. + + + + Writes a verbose message to the log using the specified verbosity and format information. + + The log. + The verbosity. + A composite format string. + An array of objects to write using format. + + + + Writes a verbose message to the log using the specified log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The log action. + + + + Writes a verbose message to the log using the specified verbosity and log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log action. + + + + Writes a debug message to the log using the specified format information. + + The log. + A composite format string. + An array of objects to write using format. + + + + Writes a debug message to the log using the specified verbosity and format information. + + The log. + The verbosity. + A composite format string. + An array of objects to write using format. + + + + Writes a debug message to the log using the specified log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The log action. + + + + Writes a debug message to the log using the specified verbosity and log message action. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log action. + + + + Writes a message to the log using the specified verbosity, log level and log action delegate. + Evaluates log message only if the verbosity is equal to or more verbose than the log's verbosity. + + The log. + The verbosity. + The log level. + The log action. + + + + Represents a log level. + + + + + Severe errors that cause premature termination. + + + + + Other runtime errors or unexpected conditions. + + + + + Use of deprecated APIs, poor use of API, 'almost' errors, other runtime + situations that are undesirable or unexpected, but not necessarily "wrong". + + + + + Interesting runtime events. + + + + + Detailed information on the flow through the system. + + + + + Most detailed information. + + + + + A log that discards messages written to it. + + + + + Writes the text representation of the specified array of objects to the + log using the specified verbosity, log level and format information. + + The verbosity. + The log level. + A composite format string. + An array of objects to write using format. + + + + Gets or sets the verbosity. + + The verbosity. + + + + Represents verbosity. + + + + + Quiet verbosity. + + + + + Minimal verbosity. + + + + + Normal verbosity. + + + + + Verbose verbosity. + + + + + Diagnostic verbosity. + + + + + Contains extension methods for . + + + + + Determines whether the specified platform is a Unix platform. + + The platform. + true if the platform is a Unix platform; otherwise false. + + + + Acts as a context providing info about the overall build following its completion + + + + + Gets a value indicating whether this build was successful + + + true if successful; otherwise false. + + + + + Gets the exception that was thrown by the target. + + + + + Represents a platform family. + + + + + The platform family is unknown. + + + + + Represents the Windows platform family. + + + + + Represents the Linux platform family. + + + + + Represents the OSX platform family. + + + + + Contains extension methods for . + + + + + Writes an empty line to the console output. + + The console to write to. + + + + Writes an empty line to the console error output. + + The console to write to. + + + + Contains extensions for . + + + + + Gets directories matching the specified filter and scope, with option to exclude hidden directories. + + The directory. + The filter. + The search scope. + Predicate used to filter directories based on file system information. + The directories matching the specified filter, scope and predicate. + + + + Gets directories matching the specified filter and scope, with option to exclude hidden directories. + + The directory. + The filter. + The search scope. + Predicate used to filter directories based on file system information. + Callback if directory gets filtered by . + The directories matching the specified filter, scope and predicate. + + + + Gets files matching the specified filter and scope. + + The directory. + The filter. + The search scope. + Predicate used to filter files based on file system information. + The files matching the specified filter, scope and predicate. + + + + Gets files matching the specified filter and scope. + + The directory. + The filter. + The search scope. + Predicate used to filter files based on file system information. + Callback if file gets filtered by . + The files matching the specified filter, scope and predicate. + + + + Contains extension methods for . + + + + + Gets the signature for a method. + + The method. + if set to true, include method namespace. + if set to true, include parameter namespace. + The method signature. + + + + Gets the full name of a method. + + The method to get the full name for. + The full name. + + + + Gets the namespace of the method. + + The method. + The namespace of the method. + + + + Contains extension methods for . + + + + + Appends the specified text to the argument builder. + + The builder. + The text to be appended. + The same instance so that multiple calls can be chained. + + + + Formats and appends the specified text to the argument builder. + + The builder. + A composite format string. + An object array that contains zero or more objects to format. + The same instance so that multiple calls can be chained. + or is null. + is invalid.-or- The index of a format item is less than zero, or greater than or equal to the length of the array. + + + + Quotes and appends the specified text to the argument builder. + + The builder. + The text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Formats, quotes and appends the specified text to the argument builder. + + The builder. + A composite format string to be quoted and appended. + An object array that contains zero or more objects to format. + The same instance so that multiple calls can be chained. + or is null. + is invalid.-or- The index of a format item is less than zero, or greater than or equal to the length of the array. + + + + Quotes and appends the specified argument to the argument builder. + + The builder. + The argument to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The secret text to be appended. + The same instance so that multiple calls can be chained. + + + + Formats and appends the specified secret text to the argument builder. + + The builder. + A composite format string for the secret text to be appended. + An object array that contains zero or more objects to format. + The same instance so that multiple calls can be chained. + or is null. + is invalid.-or- The index of a format item is less than zero, or greater than or equal to the length of the array. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The secret text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Formats, quotes and appends the specified secret text to the argument builder. + + The builder. + A composite format string for the secret text to be quoted and appended. + An object array that contains zero or more objects to format. + The same instance so that multiple calls can be chained. + or is null. + is invalid.-or- The index of a format item is less than zero, or greater than or equal to the length of the array. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified switch to the argument builder. + + The builder. + The switch preceding the text. + The text to be appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified switch to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument. + The text to be appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified text to the argument builder. + + The builder. + The switch preceding the text. + The text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified text to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument. + The text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified argument to the argument builder. + + The builder. + The switch preceding the text. + The argument to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified argument to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument. + The argument to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The secret text to be appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument + The secret text to be appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The secret text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument. + The secret text to be quoted and appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Quotes and appends the specified secret text to the argument builder. + + The builder. + The switch preceding the text. + The separator between the switch and argument + The secret argument to be appended. + The same instance so that multiple calls can be chained. + + + + Indicates whether a is null or renders empty. + + The builder. + true if refers to a null or empty ; + false if the refers to non null or empty + + + + Copies all the arguments of the source to target . + + The argument builder to copy from.. + The argument builder to copy to. + + + + Contains extension methods for . + + + + + Starts a process using the specified information. + + The process runner. + The file name such as an application or document with which to start the process. + A process handle. + + + + Contains extension methods for . + + + + + Sets the arguments for the process + + The settings. + The action used to set arguments. + The same instance so that multiple calls can be chained. + + + + Sets the working directory for the process to be started. + + The process settings. + The working directory for the process to be started. + The same instance so that multiple calls can be chained. + + + + Sets a value indicating whether the output of an application is written to the stream. + + The process settings. + true if output should be written to ; otherwise, false. The default is false. + The same instance so that multiple calls can be chained. + + + + Sets the optional timeout for process execution + + The process settings. + The timeout duration + The same instance so that multiple calls can be chained. + + + + Contains extension methods for . + + + + + Quotes the specified . + + The string to quote. + A quoted string. + + + + Unquote the specified . + + The string to unquote. + An unquoted string. + + + + Splits the into lines. + + The string to split. + The lines making up the provided string. + + + + Normalizes the line endings in a . + + The string to normalize line endings in. + A with normalized line endings. + + + + Contains extension methods for . + + + + + Determines whether the specified is static. + + The type. + Whether or not the specified type is static + + + + Gets the full name of a . + + The type. + if set to true then namespace is included. + The full name of a type + + + + Represents arguments passed to script. + + + + + Determines whether or not the specified argument exist. + + The argument name. + + true if the argument exist; otherwise false. + + + + + Gets an argument. + + The argument name. + The argument value. + + + + Represents a report printer. + + + + + Writes the specified report to a target. + + The report to write. + + + + Represents console output. + + + + + Writes the text representation of the specified array of objects to the + console output using the specified format information. + + A composite format string + An array of objects to write using format. + + + + Writes the text representation of the specified array of objects, followed + by the current line terminator, to the console output using the specified + format information. + + A composite format string + An array of objects to write using format. + + + + Writes the text representation of the specified array of objects to the + console error output using the specified format information. + + A composite format string + An array of objects to write using format. + + + + Writes the text representation of the specified array of objects, followed + by the current line terminator, to the console error output using the + specified format information. + + A composite format string + An array of objects to write using format. + + + + Sets the foreground and background console colors to their defaults. + + + + + Gets or sets the foreground color. + + The foreground color + + + + Gets or sets the background color. + + The background color + + + + Represents a argument preceded by a switch. + + + + + Represents a process argument. + + + + + Render the arguments as a . + Sensitive information will be included. + + A string representation of the argument. + + + + Renders the argument as a . + Sensitive information will be redacted. + + A safe string representation of the argument. + + + + Initializes a new instance of the class. + + The switch. + The argument. + The separator between the and the . + + + + Render the arguments as a . + Sensitive information will be included. + + + A string representation of the argument. + + + + + Renders the argument as a . + The secret text will be redacted. + + A safe string representation of the argument. + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + + + + A collection of . + + + + + Initializes a new instance of the class. + + The comparer. + + + + Initializes a new instance of the class. + + The paths. + The comparer. + is null. + + + + Adds the specified path to the collection. + + The path to add. + + true if the path was added; false if the path was already present. + + + + + Adds the specified paths to the collection. + + The paths to add. + + + + Removes the specified path from the collection. + + The path to remove. + + true if the path was removed; false if the path was not found in the collection. + + + + + Removes the specified paths from the collection. + + The paths to remove. + + + Adds a path to the collection. + The collection. + The path to add. + A new that contains the provided path as + well as the paths in the original collection. + + + Adds multiple paths to the collection. + The collection. + The paths to add. + A new with the content of both collections. + + + + Removes a path from the collection. + + The collection. + The path to remove. + A new that do not contain the provided path. + + + + Removes multiple paths from the collection. + + The collection. + The paths to remove. + A new that do not contain the provided paths. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Gets the number of directories in the collection. + + The number of directories in the collection. + + + + A collection of . + + + + + Initializes a new instance of the class. + + The comparer. + + + + Initializes a new instance of the class. + + The paths. + The comparer. + + + + Adds the specified path to the collection. + + The path to add. + + true if the path was added; false if the path was already present. + + + + + Adds the specified paths to the collection. + + The paths to add. + + + + Removes the specified path from the collection. + + The path to remove. + + true if the path was removed; false if the path was not found in the collection. + + + + + Removes the specified paths from the collection. + + The paths to remove. + + + Adds a path to the collection. + The collection. + The path to add. + A new that contains the provided path as + well as the paths in the original collection. + + + Adds multiple paths to the collection. + The collection. + The paths to add. + A new with the content of both collections. + + + + Removes a path from the collection. + + The collection. + The path to remove. + A new that do not contain the provided path. + + + + Removes multiple paths from the collection. + + The collection. + The paths to remove. + A new that do not contain the provided paths. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Gets the number of files in the collection. + + The number of files in the collection. + + + + Contains extension methods for . + + + + + Opens the file using the specified options. + + The file. + The mode. + A to the file. + + + + Opens the file using the specified options. + + The file. + The mode. + The access. + A to the file. + + + + Opens the file for reading. + + The file. + A to the file. + + + + Opens the file for writing. + If the file already exists, it will be overwritten. + + The file to be opened. + A to the file. + + + + Enumerates line in file + + The file to be read from. + The encoding that is applied to the content of the file. + A of file line content + + + + Contains extensions for . + + + + + Determines if a specified exist. + + The file system. + The path. + Whether or not the specified file exist. + + + + Determines if a specified exist. + + The file system. + The path. + Whether or not the specified directory exist. + + + + Contains extensions for . + + + + + Gets all files matching the specified pattern. + + The globber. + The pattern. + The files matching the specified pattern. + + + + Gets all directories matching the specified pattern. + + The globber. + The pattern. + The directories matching the specified pattern. + + + + Returns instances matching the specified pattern. + + The globber. + The pattern to match. + + instances matching the specified pattern. + + + + + Represents the environment Cake operates in. + + + + + Represents the environment Cake operates in. + + + + + Gets a special path. + + The path. + A to the special path. + + + + Gets an environment variable. + + The variable. + The value of the environment variable. + + + + Gets all environment variables. + + The environment variables as IDictionary<string, string> + + + + Gets whether or not the current operative system is 64 bit. + + Whether or not the current operative system is 64 bit. + + + + Determines whether the current machine is running Unix. + + Whether or not the current machine is running Unix. + + + + Gets the application root path. + + The application root path. + + + + Gets the target .Net framework version that the current AppDomain is targeting. + + The target framework. + + + + Gets or sets the working directory. + + The working directory. + + + + Gets the application root path. + + The application root path. + + + + Gets the platform Cake is running on. + + The platform Cake is running on. + + + + Gets the runtime Cake is running in. + + The runtime Cake is running in. + + + + Initializes a new instance of the class. + + The platform. + The runtime. + + + + Gets a special path. + + The path. + + A to the special path. + + + + + Gets an environment variable. + + The variable. + + The value of the environment variable. + + + + + Gets all environment variables. + + The environment variables as IDictionary<string, string> + + + + Gets whether or not the current operative system is 64 bit. + + + Whether or not the current operative system is 64 bit. + + + + + Determines whether the current machine is running Unix. + + + Whether or not the current machine is running Unix. + + + + + Gets the application root path. + + + The application root path. + + + + + Gets the target .Net framework version that the current AppDomain is targeting. + + The target framework. + + + + Gets or sets the working directory. + + The working directory. + + + + Gets the application root path. + + The application root path. + + + + Gets the platform Cake is running on. + + The platform Cake is running on. + + + + Gets the runtime Cake is running in. + + The runtime Cake is running in. + + + + Represents a directory. + + + + + Represents an entry in the file system + + + + + Gets the path to the entry. + + The path. + + + + Gets a value indicating whether this exists. + + + true if the entry exists; otherwise, false. + + + + + Gets a value indicating whether this is hidden. + + + true if the entry is hidden; otherwise, false. + + + + + Creates the directory. + + + + + Deletes the directory. + + Will perform a recursive delete if set to true. + + + + Gets directories matching the specified filter and scope. + + The filter. + The search scope. + Directories matching the filter and scope. + + + + Gets files matching the specified filter and scope. + + The filter. + The search scope. + Files matching the specified filter and scope. + + + + Gets the path to the directory. + + The path. + + + + Represents a file. + + + + + Copies the file to the specified destination path. + + The destination path. + Will overwrite existing destination file if set to true. + + + + Moves the file to the specified destination path. + + The destination path. + + + + Deletes the file. + + + + + Opens the file using the specified options. + + The file mode. + The file access. + The file share. + A to the file. + + + + Gets the path to the file. + + The path. + + + + Gets the length of the file. + + The length of the file. + + + + A physical file system implementation. + + + + + Represents a file system. + + + + + Gets a instance representing the specified path. + + The path. + A instance representing the specified path. + + + + Gets a instance representing the specified path. + + The path. + A instance representing the specified path. + + + + Gets a instance representing the specified path. + + The path. + A instance representing the specified path. + + + + Gets a instance representing the specified path. + + The path. + A instance representing the specified path. + + + + The file system globber. + + + + + Represents a file system globber. + + + + + Returns instances matching the specified pattern. + + The pattern to match. + The predicate used to filter directories based on file system information. + + instances matching the specified pattern. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + + + + Returns instances matching the specified pattern. + + The pattern to match. + The predicate used to filter directories based on file system information. + + instances matching the specified pattern. + + + + + Represents a process. + + + + + Waits for the process to exit. + + + + + Waits for the process to exit with possible timeout for command. + + The amount of time, in milliseconds, to wait for the associated process to exit. The maximum is the largest possible value of a 32-bit integer, which represents infinity to the operating system. + true if the associated process has exited; otherwise, false. + + + + Gets the exit code of the process. + + The exit code of the process. + + + + Get the standard output of process + + Returns process output RedirectStandardOutput is true + + + + Immediately stops the associated process. + + + + + Represents a process runner. + + + + + Starts a process using the specified information. + + The file name such as an application or document with which to start the process. + The information about the process to start. + A process handle. + + + + Represents the Windows registry. + + + + + Gets a registry key representing HKEY_LOCAL_MACHINE. + + + A registry key representing HKEY_LOCAL_MACHINE. + + + + + Represents a Windows registry key. + + + + + Gets all sub keys. + + All sub keys. + + + + Opens the sub key with the specified name. + + The name of the key. + The sub key with the specified name + + + + Gets the value of the key. + + The name of the key. + The value of the key. + + + + Responsible for retrieving information about the current machine. + + + + + Determines if the current operative system is 64 bit. + + Whether or not the current operative system is 64 bit. + + + + Determines whether the current machine is running Unix. + + Whether or not the current machine is running Unix. + + + + Determines whether the current machine is running Unix. + + The platform family. + Whether or not the current machine is running Unix. + + + + Gets the platform family. + + The platform family. + + + + Represents a NuGet path resolver. + + + + + Resolves the path to nuget.exe. + + The path to nuget.exe. + + + + Contains NuGet path resolver functionality + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The tool locator. + + + + Resolves the path to nuget.exe. + + The path to nuget.exe. + + + + Provides properties and instance methods for working with paths. + This class must be inherited. + + + + + Initializes a new instance of the class. + + The path. + + + + Returns a that represents this path. + + + A that represents this instance. + + + + + Gets the full path. + + The full path. + + + + Gets a value indicating whether this path is relative. + + + true if this path is relative; otherwise, false. + + + + + Gets the segments making up the path. + + The segments making up the path. + + + + Represents a directory path. + + + + + Initializes a new instance of the class. + + The path. + + + + Gets the name of the directory. + + The directory name. + + If this is passed a file path, it will return the file name. + This is by-and-large equivalent to how DirectoryInfo handles this scenario. + If we wanted to return the *actual* directory name, we'd need to pull in IFileSystem, + and do various checks to make sure things exists. + + + + + Combines the current path with the file name of a . + + The path. + A combination of the current path and the file name of the provided . + + + + Combines the current path with a . + The provided must be relative. + + The path. + A combination of the current path and the provided . + + + + Combines the current path with another . + The provided must be relative. + + The path. + A combination of the current path and the provided . + + + + Makes the path absolute to another (absolute) path. + + The path. + An absolute path. + + + + Makes the path absolute (if relative) using the current working directory. + + The environment. + An absolute path. + + + + Collapses a containing ellipses. + + A collapsed . + + + + Performs an implicit conversion from to . + + The path. + A . + + + + Performs a conversion from to . + + The path. + A . + + + + Get the relative path to another directory. + + The target directory path. + A . + + + + Get the relative path to another file. + + The target file path. + A . + + + + Represents a file path. + + + + + Initializes a new instance of the class. + + The path. + + + + Gets the directory part of the path. + + The directory part of the path. + + + + Gets the filename. + + The filename. + + + + Gets the filename without it's extension. + + The filename without it's extension. + + + + Gets the file extension. + + The file extension. + + + + Changes the file extension of the path. + + The new extension. + A new with a new extension. + + + + Appends a file extension to the path. + + The extension. + A new with an appended extension. + + + + Makes the path absolute (if relative) using the current working directory. + + The environment. + An absolute path. + + + + Makes the path absolute (if relative) using the specified directory path. + + The path. + An absolute path. + + + + Collapses a containing ellipses. + + A collapsed . + + + + Performs an implicit conversion from to . + + The path. + A . + + + + Performs a conversion from to . + + The path. + A . + + + + Get the relative path to another directory. + + The target directory path. + A . + + + + Get the relative path to another file. + + The target file path. + A . + + + + Gets a value indicating whether this path has a file extension. + + + true if this file path has a file extension; otherwise, false. + + + + + Compares instances. + + + + + The default path comparer. + + + + + Initializes a new instance of the class. + + if set to true, comparison is case sensitive. + + + + Initializes a new instance of the class. + + The environment. + + + + Determines whether the specified instances are equal. + + The first to compare. + The second to compare. + + True if the specified instances are equal; otherwise, false. + + + + + Returns a hash code for the specified . + + The path. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets a value indicating whether comparison is case sensitive. + + + true if comparison is case sensitive; otherwise, false. + + + + + Responsible for starting processes. + + + + + Initializes a new instance of the class. + + The environment. + The log. + + + + Starts a process using the specified information. + + The file name such as an application or document with which to start the process. + The information about the process to start. + A process handle. + + + + Specifies a set of values that are used to start a process. + + + + + Gets or sets the set of command-line arguments to use when starting the application. + + The set of command-line arguments to use when starting the application. + + + + Gets or sets the working directory for the process to be started. + + The working directory for the process to be started. + + + + Gets or sets a value indicating whether the output of an application is written to the stream. + + true if output should be written to ; otherwise, false. The default is false. + + + + Gets or sets optional timeout, in milliseconds, to wait for the associated process to exit. The maximum is the largest possible value of a 32-bit integer, which represents infinity to the operating system. + + + + + Gets or sets a value indicating whether process output will be suppressed. + + + true if process output will be suppressed; otherwise, false. + + + + + Gets or sets search paths for files, directories for temporary files, application-specific options, and other similar information. + + + + StartProcess("cmd", new ProcessSettings{ + Arguments = "/c set", + EnvironmentVariables = new Dictionary<string, string>{ + { "CI", "True" }, + { "TEMP", MakeAbsolute(Directory("./Temp")).FullPath } + } + }); + + + + + + Represents a quoted argument. + + + + + Initializes a new instance of the class. + + The argument. + + + + Render the arguments as a . + Sensitive information will be included. + + A string representation of the argument. + + + + Renders the argument as a . + Sensitive information will be redacted. + + A safe string representation of the argument. + + + + Returns a that represents the current object. + + A string that represents the current object. + + + + Represents a search scope. + + + + + The current directory. + + + + + The current directory and child directories. + + + + + Represents a secret argument. + + + + + Initializes a new instance of the class. + + The argument. + + + + Render the arguments as a . + The secret text will be included. + + A string representation of the argument. + + + + Renders the argument as a . + The secret text will be redacted. + + A safe string representation of the argument. + + + + Returns a that represents the current object. + + A string that represents the current object. + + + + Represents a special path. + + + + + The directory that serves as a common repository for application-specific + data for the current roaming user. + + + + + The directory that serves as a common repository for application-specific + data that is used by all users. + + + + + The directory that serves as a common repository for application-specific + data that is used by the current, non-roaming user. + + + + + The Program Files folder. + + + + + The Program Files (X86) folder. + + + + + The Windows folder. + + + + + The current user's temporary folder. + + + + + Represents a text argument. + + + + + Initializes a new instance of the class. + + The text. + + + + Render the arguments as a . + Sensitive information will be included. + + + A string representation of the argument. + + + + + Renders the argument as a . + Sensitive information will be redacted. + + + A safe string representation of the argument. + + + + + Returns a that represents the current object. + + A string that represents the current object. + + + + Represents an Windows implementation of . + + + + + Gets the LocalMachine . + + + + + Acts as a context providing info about a before its invocation. + + + + + Gets the describing the that has just been invoked. + + + The task. + + + + + Acts as a context providing info about a following its invocation. + + + + + Gets the describing the that has just been invoked. + + + The task. + + + + + Gets the duration of the 's execution. + + + The duration of the 's execution. + + + + + Gets a value indicating whether this was skipped (not executed). + + + true if skipped; otherwise, false. + + + + + The module responsible for registering + default types in the Cake.Core assembly. + + + + + Performs custom registrations in the provided registry. + + The container registry. + + + + Abstract line processor. + + + + + Initializes a new instance of the class. + + The environment. + + + + Processes the specified line. + + The analyzer. + The line. + The replacement for line, null if no replacement + true if the line was processed + by this processor; otherwise false. + + + + Splits the specified line into tokens. + + The line to split. + The parts that make up the line. + + + + Gets the absolute directory for the path. + + The path. + The absolute directory path. + + + + Represents an installer for a specific package. + + + + + Determines whether this instance can install the specified resource. + + The package resource. + The package type. + + true if this installer can install the + specified resource; otherwise false. + + + + + Installs the specified resource at the given location. + + The package resource. + The package type. + The location where to install the resource. + The installed files. + + + + Represents an URI resource. + + + + + Initializes a new instance of the class. + + The URI. + + + + Initializes a new instance of the class. + + The URI. + Package query string parameter is missing.;uri + + + + Gets the original string. + + The original string. + + + + Gets the scheme. + + The scheme. + + + + Gets the address. + + The address. + + + + Gets the parameters. + + The parameters. + + + + Gets the package. + + The package. + + + + Represents a package type. + + + + + Represents an unspecified package type. + + + + + Represents an addin. + + + + + Represents a tool. + + + + + The namespace contains fundamental classes and + base classes for Cake and the Cake scripting environment. + + + + + This namespace contain attributes used by + the Cake engine and addins. + + + + + This namespace contain types that + enable you to implement custom logging support + and interact with build logs. + + + + + This namespace contain fundamental types that support + input and output, including the ability to read and write data + to streams and to interact with the file system. + + + + + This namespace contain types + used to compose process arguments in a safe way. + + + + + This namespace contain types + related to NuGet functionality. + + + + + This namespace contain types + related to script processing and execution. + + + + + This namespace contain types + related to script processing. + + + + + This namespace contain types + related to text processing and transformations. + + + + + This namespace contain base classes + and functionality related to tooling. + + + + + This namespace contain base classes + and functionality related to tooling. + The content in this namespace has been obsoleted. + + + + + Represents the script analyzer responsible for + parsing and analyzing scripts. + + + + + Analyzes the specified script path. + + The path to the script to analyze. + The script analysis result. + + + + Represents the context used by the . + + + + + Processes the specified script path using the same context. + + The script path to process. + + + + Adds a script line to the result. + + The script line to add. + + + + Gets the current script being processed. + + The current script being processed. + + + + Represents information about a script. + + + + + Gets the script path. + + The script path. + + + + Gets the includes. + + The includes. + + + + Gets the referenced script assemblies. + + The referenced script assemblies. + + + + Gets all namespaces referenced by the script. + + The namespaces referenced by the script. + + + + Gets all using aliases defined by the scripts. + + The using aliases defined by the script. + + + + Gets the tools. + + The tools. + + + + Gets the addins. + + The addins. + + + + The script analyzer. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The log. + + + + Analyzes the specified script path. + + The path to the script to analyze. + The script analysis result. + + + + Represents a script analysis result. + + + + + Initializes a new instance of the class. + + The script. + The merged script lines. + + + + Gets the analyzed script. + + The script. + + + + Gets the merged script lines. + + The merged script lines. + + + + Gets all references. + + The references. + + + + Gets all the namespaces. + + The namespaces. + + + + Gets the using aliases. + + The using aliases. + + + + Gets the addins. + + The addins. + + + + Gets the tools. + + The tools. + + + + Responsible for generating script method aliases. + + + + + Generates a script method alias from the specified method. + The provided method must be an extension method for + and it must be decorated with the . + + The method to generate the code for. + The generated code. + + + + Responsible for generating script property aliases. + + + + + Generates a script property alias from the specified method. + The provided method must be an extension method for + and it must be decorated with the . + + The method to generate the code for. + The generated code. + + + + Represents a script alias generator. + + + + + Finds script aliases in the provided assemblies. + + The assemblies to find script aliases in. + The script aliases that were found. + + + + Represents the script conventions used by Cake. + + + + + Gets the default namespaces. + + A list containing all default namespaces. + + + + Gets the default assemblies. + + The root to where to find Cake related assemblies. + A list containing all default assemblies. + + + + Represents a script engine. + + + + + Creates a new script session. + + The host. + The script arguments. + A new script session. + + + + Represents a script host that works as a context for scripts. + + + + + Registers a new task. + + The name of the task. + A . + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, its task will not be executed but the task teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, its task will not be executed but the task teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Runs the specified target. + + The target to run. + The resulting report. + + + + Gets the context. + + The context. + + + + Gets all registered tasks. + + The registered tasks. + + + + Represents a script processor. + + + + + Installs the addins. + + The analyzer result. + The install path. + A list containing file paths to installed addin assemblies. + + + + Installs the tools specified in the build scripts. + + The analyzer result. + The install path. + + + + Represents a script runner responsible for running scripts. + + + + + Runs the script using the specified script host. + + The script host. + The script path. + The arguments. + + + + Represents a script session. + + + + + Adds a reference path to the session. + + The reference path. + + + + Adds an assembly reference to the session. + + The assembly reference. + + + + Imports a namespace to the session. + + The namespace to import. + + + + Executes the specified script. + + The script to execute. + + + + Utility for building process arguments. + + + + + Initializes a new instance of the class. + + + + + Clears all arguments from the builder. + + + + + Appends an argument. + + The argument. + + + + Renders the arguments as a . + Sensitive information will be included. + + A string representation of the arguments. + + + + Renders the arguments as a . + Sensitive information will be redacted. + + A safe string representation of the arguments. + + + + Tries to filer any unsafe arguments from string + + unsafe source string. + Filtered string. + + + + Performs an implicit conversion from to . + + The text value to convert. + A . + + + + Performs a conversion from to . + + The text value to convert. + A . + + + + Gets the number of arguments contained in the . + + + + + Represents a script. + + + + + Initializes a new instance of the class. + + The namespaces. + The scrip lines. + The script aliases. + The using alias directives. + + + + Gets the namespaces imported via the using statement. + + The namespaces. + + + + Gets the script lines. + + + The lines. + + + + + Gets the aliases. + + The aliases. + + + + Gets the using alias directives. + + The using alias directives. + + + + Represents a script alias. + + + + + Initializes a new instance of the class. + + The method associated with the alias. + The alias type. + The namespaces that the alias need to be imported. + + + + Gets the name of the alias. + + The name. + + + + Gets the method associated with the alias. + + The method associated with the alias. + + + + Gets the alias type. + + The alias type. + + + + Gets all namespaces that the alias need to be imported. + + + The namespaces that the alias need to be imported. + + + + + The script alias finder. + + + + + Initializes a new instance of the class. + + The log. + + + + Finds script aliases in the provided assemblies. + + The assemblies to find script aliases in. + The script aliases that were found. + + + + Represents a script alias type. + + + + + Represents an unknown script alias type. + + + + + Represents a script alias method. + + + + + Represents a script alias property. + + + + + The script conventions used by Cake. + + + + + Initializes a new instance of the class. + + The file system. + + + + Gets the default namespaces. + + A list containing all default namespaces. + + + + Gets the default assemblies. + + The root to where to find Cake related assemblies. + A list containing all default assemblies. + + + + The script host works as a context for scripts. + + + + + Initializes a new instance of the class. + + The engine. + The context. + + + + Registers a new task. + + The name of the task. + A . + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed before any tasks are run. + If setup fails, no tasks will be executed but teardown will be performed. + + The action to be executed. + + + Setup(context => { + context.Log.Information("Hello World!"); + }); + + + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + + Allows registration of an action that's executed after all other tasks have been run. + If a setup action or a task fails with or without recovery, the specified teardown action will still be executed. + + The action to be executed. + + + Teardown(context => { + context.Log.Information("Goodbye World!"); + }); + + + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, its task will not be executed but the task teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed before each task is run. + If the task setup fails, its task will not be executed but the task teardown will be performed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Allows registration of an action that's executed after each task has been run. + If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed. + + The action to be executed. + + + + Runs the specified target. + + The target to run. + The resulting report. + + + + Gets the engine. + + The engine. + + + + Gets the context. + + The context. + + + + Gets all registered tasks. + + The registered tasks. + + + + Implementation of a script processor. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The log. + The tool locator. + The available package installers. + + + + Installs the addins. + + The analyzer result. + The install path. + A list containing file paths to installed addin assemblies. + + + + Installs the tools specified in the build scripts. + + The analyzer result. + The install path. + + + + Responsible for running scripts. + + + + + Initializes a new instance of the class. + + The environment. + The log. + The configuration. + The session factory. + The alias finder. + The script analyzer. + The script processor. + The script conventions. + + + + Runs the script using the specified script host. + + The script host. + The script. + The arguments. + + + + Acts as a context providing info about a before its invocation. + + + + + Initializes a new instance of the class. + + The Cake Context. + The task. + + + + Gets the describing the that has just been invoked. + + + The task. + + + + + Acts as a context providing info about a following its invocation. + + + + + Initializes a new instance of the class. + + The Cake Context. + The task. + The duration of the task. + if set to true, the task was not executed. + + + + Gets the describing the that has just been invoked. + + + The task. + + + + + Gets the duration of the 's execution. + + + The duration of the 's execution. + + + + + Gets a value indicating whether the was skipped (not executed). + + + true if skipped; otherwise, false. + + + + + Acts as a context providing info about the overall build following its completion + + + + + Initializes a new instance of the class. + + The Cake Context + The exception that was thrown by the target. + + + + Gets a value indicating whether this build was successful + + + true if successful; otherwise false. + + + + + Gets the exception that was thrown by the target. + + + + + Represents a text template. + + + + + Registers a key and an associated value. + + The key. + The value. + + + + Renders the text template using the registered tokens. + + The rendered template. + + + + Provides template functionality for simple text transformations. + + + + + Initializes a new instance of the class. + + The template. + + + + Initializes a new instance of the class. + + The template. + The key placeholder. + + + + Registers a key and an associated value. + + The key. + The value. + + + + Renders the template using the registered tokens. + + The rendered template. + + + + Represents a tool repository. + + + + + Registers the specified path with the repository. + + The path to register. + + + + Resolves the specified tool. + + The tool to resolve. + The tool's file paths if any; otherwise null. + + + + Represents a tool resolution strategy. + + + + + Resolves the specified tool using the specified tool repository. + + The tool repository. + The tool. + The path to the tool; otherwise null. + + + + Represents a tool locator. + + + + + Registers the specified tool file path. + + The tool path. + + + + Resolves the path to the specified tool. + + The tool. + A path if the tool was found; otherwise null. + + + + Base class for tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The globber. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The tool locator. + + + + Runs the tool using the specified settings. + + The settings. + The arguments. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The process settings + If specified called after process exit + + + + Customized exit code handling. + Standard behavior is to fail when non zero. + + The process exit code + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The process that the tool is running under. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The process settings + The process that the tool is running under. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets the working directory. + Defaults to the currently set working directory. + + The settings. + The working directory for the tool. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + + Gets the environment variables. + + The settings. + The environment variables for the tool. + + + + The tool repository. + + + + + Initializes a new instance of the class. + + The environment. + + + + Registers the specified path with the repository. + + The path to register. + + + + Resolves the specified tool. + + The tool to resolve. + + The tool's file paths if any; otherwise null. + + + + + Implementation of the default tool resolution strategy. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The globber. + The configuration. + + + + Resolves the specified tool using the specified tool repository. + + The tool repository. + The tool. + + The path to the tool; otherwise null. + + + + + Implementation of the tool locator. + + + + + Initializes a new instance of the class. + + The environment. + The tool repository. + The tool resolution strategy. + + + + Registers the specified tool file path. + + The tool path. + + + + Resolves the path to the specified tool. + + The tool. + A path if the tool was found; otherwise null. + + + + Base class for tool settings. + + + + + Gets or sets the tool path. + + The tool path. + + + + Gets or sets optional timeout for tool execution. + + + + + Gets or sets the working directory for the tool process. + + The working directory for the tool process. + + + + Gets or sets the argument customization. + Argument customization is a way that lets you add, replace or reuse arguments passed to a tool. + This allows you to support new tool arguments, customize arguments or address potential argument issues. + + + Combining tool specific settings and tool arguments: + + NuGetAddSource("Cake", "https://www.myget.org/F/cake/api/v3/index.json", + new NuGetSourcesSettings { UserName = "user", Password = "incorrect", + ArgumentCustomization = args=>args.Append("-StorePasswordInClearText") + }); + + + + Setting multiple tool arguments: + + MSTest(pathPattern, new MSTestSettings() + { ArgumentCustomization = args=>args.Append("/detail:errormessage") + .Append("/resultsfile:TestResults.trx") }); + + + The delegate used to customize the . + + + + Gets or sets search paths for files, directories for temporary files, application-specific options, and other similar information. + + + + MSBuild("./src/Cake.sln", new MSBuildSettings { + EnvironmentVariables = new Dictionary<string, string>{ + { "TOOLSPATH", MakeAbsolute(Directory("./tools")).FullPath } + }}); + + + + + + Base class for tools. + + The settings type. + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The globber. + + + + Runs the tool using the specified settings. + + The settings. + The arguments. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The tool path to use. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The tool path to use. + The process settings + If specified called after process exit + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The process that the tool is running under. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The tool path to use. + The process that the tool is running under. + + + + Runs the tool using a custom tool path and the specified settings. + + The settings. + The arguments. + The tool path to use. + The process settings + The process that the tool is running under. + + + + Gets the tool path. + + The settings. + The provided tool path (if any). + The tool path. + + + + Gets the name of the tool. + + The name of the tool. + + + + Gets the possible names of the tool executable. + + The tool executable name. + + + + Gets the working directory. + Defaults to the currently set working directory. + + The settings. + The working directory for the tool. + + + + Gets alternative file paths which the tool may exist in + + The settings. + The default tool path. + + + diff --git a/Build/tools/Cake/Cake.NuGet.dll b/Build/tools/Cake/Cake.NuGet.dll new file mode 100644 index 00000000..03f40069 Binary files /dev/null and b/Build/tools/Cake/Cake.NuGet.dll differ diff --git a/Build/tools/Cake/Cake.NuGet.xml b/Build/tools/Cake/Cake.NuGet.xml new file mode 100644 index 00000000..5e2c04bd --- /dev/null +++ b/Build/tools/Cake/Cake.NuGet.xml @@ -0,0 +1,345 @@ + + + + Cake.NuGet + + + + + Represents an object that parses the segments of a filepath for a .Net framework name + + + + + Represents an object that parses the segments of a filepath for a .Net framework name + + + + + Parses the framework name from assembly file path. + + The assembly file path. + the parsed framework name, or null when path contains no folders. + + + + Initializes a new instance of the class. + + The framework name parser. + + + + Parses the framework name from assembly file path. + + The assembly file path. + the parsed framework name, or null when path contains no folders. + + + + The config key name for overriding the default nuget package source + + + + + Parses version-specific folder names into an instance of FrameworkName + + + + + This function tries to normalize a string that represents framework version names + (the name of a framework version-specific folder in a nuget package, i.e., "net451" or "net35") into + something a framework name that the package manager understands. + + value to be parsed. + A FrameworkName instance corresponding with the provided frameworkName token. + When parsing is unsuccessful, returns a FrameworkName with an Identifier property of "Unsupported." + when frameworkName is null. + + + + Represents an item that may support specific .Net framework versions + + + + + Gets the frameworks supported by this item. + + + The supported frameworks. + + + + + Filters assemblies for .Net target framework compatibility + + + + + Filters a collection of assembly files for .Net target framework compatibility. + + The target framework. + The assembly file paths, relative to their package folder. + a subset of the provided assemblyFiles that match the provided targetFramework. + + + + Wrapper interface for NuGet's Target Framework compatibility functionality. + + + + + Filters the provided list of items, returning only those items compatible with the given project framework. + + the type of items being filtered + The project framework. + The items. + The compatible items. Empty if try is unsuccessful. + + projectFramework + or + items + + + + + Finds assemblies included in a nuget package. + + + + + Finds assemblies (DLLs) included in a nuget package. + + The package directory. + + the DLLs. + + + + + Represents a file locator for NuGet packages that returns relevant + files for the current framework given the resource type. + + + + + Gets the relevant files for a NuGet package + given a path and a resource type. + + The path to search. + The resource type. + A collection of files. + + + + Bundles packageAssemblyFiles into package reference sets grouped by their target framework. + + + + + Bundles the provided packageAssemblyFiles into package reference sets grouped by their target framework. + + The package assembly files. + The newly created PackageReferenceSets + + + + The module responsible for registering + default types in the Cake.NuGet assembly. + + + + + Performs custom registrations in the provided registry. + + The container registry. + + + + Filters assemblies for .Net target framework compatibility + + + + + Initializes a new instance of the class. + + The framework compatibility filter. + The reference set factory. + + + + Filters the assemblies for .Net target framework compatibility . + + The target framework. + The assembly files. + a subset of the provided assemblyFiles that match the provided targetFramework. + + + + Finds assemblies (DLLs) included in a nuget package. + + + + + Initializes a new instance of the class. + + The file system. + The log. + The assembly compatibility filter. + The environment. + + + + Finds assemblies (DLLs) included in a nuget package. + + The package directory. + + the DLLs. + + + + + Implementation of a file locator for NuGet packages that + returns relevant files for the current framework given a resource type. + + + + + Initializes a new instance of the class. + + The file system. + The locator. + + + + Gets the relevant files for a NuGet package + given a path and a resource type. + + The path to search. + The resource type. + A collection of files. + + + + Installer for NuGet URI resources. + + + + + Initializes a new instance of the class. + + The file system. + The environment. + The process runner. + The NuGet tool resolver. + The content resolver. + The log. + the configuration + + + + Determines whether this instance can install the specified resource. + + The package reference. + The package type. + + true if this installer can install the + specified resource; otherwise false. + + + + + Installs the specified resource at the given location. + + The package reference. + The package type. + The location where to install the package. + The installed files. + + + + Bundles packageAssemblyFiles into package reference sets grouped by their target framework. + + + + + Initializes a new instance of the class. + + The framework name parser. + + + + Bundles the provided packageAssemblyFiles into package reference sets grouped by their target framework. + + The package assembly files. + The newly created PackageReferenceSets + + + + Represents a targetFramework-specific set of assembly references belonging to a nuget package. + + + + + Initializes a new instance of the class. + + The target framework. May be null. + The references. + is null. + + + + Gets the references. + + + The references. + + + + + Gets the target framework. + + + The target framework. + + + + + Gets the supported frameworks. + + + The supported frameworks. + + + + + Adapts NuGet's to , + . + + + + + This function tries to normalize a string that represents framework version names + (the name of a framework version-specific folder in a nuget package, i.e., "net451" or "net35") into + something a framework name that the package manager understands. + + value to be parsed. + + A FrameworkName instance corresponding with the provided frameworkName token. + When parsing is unsuccessful, returns a FrameworkName with an Identifier property of "Unsupported." + + when frameworkName is null. + + + + Filters the provided list of items, returning only those items compatible with the given project framework. + + the type of items being filtered + The project framework. + The items. + The compatible items. Empty if try is unsuccessful. + + projectFramework or items + + + + diff --git a/Build/tools/Cake/Cake.exe b/Build/tools/Cake/Cake.exe new file mode 100644 index 00000000..d6ace558 Binary files /dev/null and b/Build/tools/Cake/Cake.exe differ diff --git a/Build/tools/Cake/LICENSE b/Build/tools/Cake/LICENSE new file mode 100644 index 00000000..403462ac --- /dev/null +++ b/Build/tools/Cake/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Build/tools/Cake/Mono.CSharp.dll b/Build/tools/Cake/Mono.CSharp.dll new file mode 100644 index 00000000..2d0ac687 Binary files /dev/null and b/Build/tools/Cake/Mono.CSharp.dll differ diff --git a/Build/tools/Cake/NuGet.Core.dll b/Build/tools/Cake/NuGet.Core.dll new file mode 100644 index 00000000..fb1119e5 Binary files /dev/null and b/Build/tools/Cake/NuGet.Core.dll differ diff --git a/Build/tools/Cake/Roslyn.Compilers.CSharp.dll b/Build/tools/Cake/Roslyn.Compilers.CSharp.dll new file mode 100644 index 00000000..9da1db21 Binary files /dev/null and b/Build/tools/Cake/Roslyn.Compilers.CSharp.dll differ diff --git a/Build/tools/Cake/Roslyn.Compilers.dll b/Build/tools/Cake/Roslyn.Compilers.dll new file mode 100644 index 00000000..bf7fb3e0 Binary files /dev/null and b/Build/tools/Cake/Roslyn.Compilers.dll differ diff --git a/Build/tools/gitlink/lib/net45/GitLink.exe b/Build/tools/gitlink/lib/net45/GitLink.exe new file mode 100644 index 00000000..b8320d09 Binary files /dev/null and b/Build/tools/gitlink/lib/net45/GitLink.exe differ diff --git a/Build/tools/nuget.exe b/Build/tools/nuget.exe new file mode 100644 index 00000000..6bb79fe5 Binary files /dev/null and b/Build/tools/nuget.exe differ diff --git a/Build/tools/packages.config b/Build/tools/packages.config new file mode 100644 index 00000000..89d4cd15 --- /dev/null +++ b/Build/tools/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/Build/tools/packages.config.md5sum b/Build/tools/packages.config.md5sum new file mode 100644 index 00000000..697a25b3 --- /dev/null +++ b/Build/tools/packages.config.md5sum @@ -0,0 +1 @@ +ED-03-B3-45-EC-E6-D4-A4-73-EE-E7-99-A9-C7-43-44 diff --git a/Examples/DefaultsExample/App.xaml b/Examples/DefaultsExample/App.xaml deleted file mode 100644 index b2e4ec2a..00000000 --- a/Examples/DefaultsExample/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/Examples/DefaultsExample/CustomListBoxItem.cs b/Examples/DefaultsExample/CustomListBoxItem.cs deleted file mode 100644 index f849664e..00000000 --- a/Examples/DefaultsExample/CustomListBoxItem.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Windows.Controls; - -namespace DefaultsExample -{ - public class CustomListBoxItem : ListBoxItem - { - public CustomListBoxItem() - { - // debug ctor - var debug = "it works"; - } - } -} \ No newline at end of file diff --git a/Examples/DefaultsExample/Data.cs b/Examples/DefaultsExample/Data.cs deleted file mode 100644 index 344e27dd..00000000 --- a/Examples/DefaultsExample/Data.cs +++ /dev/null @@ -1,280 +0,0 @@ -using System; -using System.Collections.ObjectModel; -using System.Windows; -using GongSolutions.Wpf.DragDrop; -using System.ComponentModel; -using System.Linq; -using System.Windows.Controls; -using DragDrop = GongSolutions.Wpf.DragDrop.DragDrop; - -namespace DefaultsExample -{ - public class CustomDropHandlerForIssue85 : IDropTarget - { - public void DragOver(IDropInfo dropInfo) - { - dropInfo.Effects = DragDropEffects.Copy; - } - - public void Drop(IDropInfo dropInfo) - { - MessageBox.Show("He, now it works :-D"); - ((TextBox)dropInfo.VisualTarget).Text = dropInfo.Data != null ? dropInfo.Data.ToString() : string.Empty; - } - } - - public class CustomDragHandlerForIssue84 : IDragSource - { - public virtual void StartDrag(IDragInfo dragInfo) - { - // nothing special here, use the default way - DragDrop.DefaultDragHandler.StartDrag(dragInfo); - } - - public bool CanStartDrag(IDragInfo dragInfo) - { - // so here is the magic - if (dragInfo != null) { - if ((dragInfo.SourceIndex % 2) == 0) { - return false; - } - } - return true; - } - - public virtual void Dropped(IDropInfo dropInfo) - { - } - - public virtual void DragCancelled() - { - } - - public bool TryCatchOccurredException(Exception exception) - { - return false; - } - } - - internal class Data : IDropTarget - { - public Data() - { - this.Collection1 = new ObservableCollection(); - this.Collection2 = new ObservableCollection(); - this.Collection3 = new ObservableCollection(); - this.Collection4 = new ObservableCollection(); - this.CustomCollection1 = new ObservableCollection(); - this.CustomCollection2 = new ObservableCollection(); - this.ClonableCollection1 = new ObservableCollection(); - this.ClonableCollection2 = new ObservableCollection(); - - this.CustomDropHandler = new CustomDropHandlerForIssue85(); - this.CustomDragHandler = new CustomDragHandlerForIssue84(); - - for (var n = 0; n < 100; ++n) { - this.Collection1.Add("Item " + n); - this.CustomCollection1.Add(new CustomDataModel { Name = "Custom Item " + n }); - this.ClonableCollection1.Add(new ClonableDataModel("Clonable Item " + n )); - } - - for (var n = 0; n < 4; ++n) { - this.Collection4.Add("Content " + n); - } - - this.GroupedCollection = new ObservableCollection(); - for (var g = 0; g < 4; ++g) { - for (var i = 0; i < 2; ++i) { - this.GroupedCollection.Add(new GroupedItem("Group " + g, "Group " + g + " Item " + i)); - } - } - - var root1 = new TreeNode("Root 1"); - for (var n = 0; n < 10; ++n) { - root1.Children.Add(new TreeNode("Item " + n)); - } - - var root2 = new TreeNode("Root 2"); - for (var n = 0; n < 4; ++n) { - root2.Children.Add(new TreeNode("Item " + (n + 10))); - } - - this.TreeCollection = new ObservableCollection { - root1, root2 - }; - this.TreeCollection2 = new ObservableCollection(); - } - - public ObservableCollection Collection1 { get; private set; } - public ObservableCollection Collection2 { get; private set; } - public ObservableCollection Collection3 { get; private set; } - public ObservableCollection Collection4 { get; private set; } - public ObservableCollection CustomCollection1 { get; private set; } - public ObservableCollection CustomCollection2 { get; private set; } - public ObservableCollection ClonableCollection1 { get; private set; } - public ObservableCollection ClonableCollection2 { get; private set; } - public ObservableCollection GroupedCollection { get; private set; } - public ObservableCollection TreeCollection { get; private set; } - public ObservableCollection TreeCollection2 { get; private set; } - - public CustomDropHandlerForIssue85 CustomDropHandler { get; private set; } - public CustomDragHandlerForIssue84 CustomDragHandler { get; private set; } - - // - // The drop handler is only used for the grouping example. - // - - void IDropTarget.DragOver(IDropInfo dropInfo) - { - DragDrop.DefaultDropHandler.DragOver(dropInfo); - if ((dropInfo.Data is CustomDataModel) || dropInfo.TargetGroup == null) { - dropInfo.Effects = System.Windows.DragDropEffects.None; - } - } - - void IDropTarget.Drop(IDropInfo dropInfo) - { - // I know this example is called DefaultsExample, but the default handlers don't know how - // to set an item's group. You need to explicitly set the group on the dropped item like this. - DragDrop.DefaultDropHandler.Drop(dropInfo); - var data = DefaultDropHandler.ExtractData(dropInfo.Data).OfType().ToList(); - foreach (var groupedItem in data) { - groupedItem.Group = dropInfo.TargetGroup.Name.ToString(); - } - - // Changing group data at runtime isn't handled well: force a refresh on the collection view. - if (dropInfo.TargetCollection is ICollectionView) { - ((ICollectionView)dropInfo.TargetCollection).Refresh(); - } - } - } - - internal class CustomDataModel : IDropTarget - { - public string Name { get; set; } - - public void DragOver(IDropInfo dropInfo) - { - if (dropInfo.DragInfo.Data is CustomDataModel) { - dropInfo.Effects = DragDropEffects.Copy; - dropInfo.DropTargetAdorner = DropTargetAdorners.Insert; - - // test for handled - dropInfo.NotHandled = true; // now the DefaultDropHandler should work - } - } - - public void Drop(IDropInfo dropInfo) - { - if (dropInfo.DragInfo.Data is CustomDataModel) { - dropInfo.NotHandled = true; // now the DefaultDropHandler should work - } - } - } - - internal class ClonableDataModel : ICloneable, INotifyPropertyChanged - { - public ClonableDataModel(string name) - { - Name = name; - } - - private string _name; - public string Name - { - get { return this._name; } - set - { - if (this._name != value) - { - this._name = value; - this.OnPropertyChanged("Name"); - } - } - } - - public object Clone() - { - return new ClonableDataModel(Name + ", now cloned"); - } - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void OnPropertyChanged(string propertyName) - { - var handler = PropertyChanged; - if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } - } - } - - internal class TreeNode : ICloneable - { - public TreeNode(string caption) - { - this.Caption = caption; - this.Children = new ObservableCollection(); - } - - public string Caption { get; private set; } - public ObservableCollection Children { get; private set; } - - public override string ToString() - { - return this.Caption; - } - - public object Clone() - { - var treeNode = new TreeNode(this.Caption); - foreach (var child in this.Children) - { - treeNode.Children.Add((TreeNode) child.Clone()); - } - return treeNode; - } - } - - internal class GroupedItem : INotifyPropertyChanged - { - public GroupedItem(string group, string caption) - { - this.Caption = caption; - this.m_Group = group; - } - - public override string ToString() - { - return this.m_Group + " " + this.Caption; - } - - public string Caption { get; private set; } - - public string Group - { - get { return this.m_Group; } - set - { - if (this.m_Group != value) { - this.m_Group = value; - this.OnPropertyChanged("Group"); - } - } - } - - public event PropertyChangedEventHandler PropertyChanged; - - private void OnPropertyChanged(string name) - { - if (this.PropertyChanged != null) { - this.PropertyChanged(this, new PropertyChangedEventArgs(name)); - } - } - - private string m_Group; - } - - internal class ItemViewModel - { - public int Index { get; set; } - } -} \ No newline at end of file diff --git a/Examples/DefaultsExample/DefaultsExample (NET35).csproj b/Examples/DefaultsExample/DefaultsExample (NET35).csproj deleted file mode 100644 index 89dc6f58..00000000 --- a/Examples/DefaultsExample/DefaultsExample (NET35).csproj +++ /dev/null @@ -1,166 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8A43AA51-6D56-4D11-8CD8-47361E9E2CA4} - WinExe - Properties - DefaultsExample - DefaultsExample - v3.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - ..\..\ - true - - - true - full - false - bin\Debug\NET35\ - obj\Debug\NET35\ - TRACE;DEBUG;NET35 - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\NET35\ - obj\Release\NET35\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - ..\..\packages\WPFToolkit.3.5.50211.1\lib\WPFToolkit.dll - - - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - - - MainWindow.xaml - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - {f4562c4b-9d6f-4c80-9c75-bf194a3d7ccc} - GongSolutions.Wpf.DragDrop %28NET35%29 - - - - - - \ No newline at end of file diff --git a/Examples/DefaultsExample/DefaultsExample (NET4).csproj b/Examples/DefaultsExample/DefaultsExample (NET4).csproj deleted file mode 100644 index d3084504..00000000 --- a/Examples/DefaultsExample/DefaultsExample (NET4).csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {310992A5-1F59-472C-A6BB-8CFDA2FE1EA0} - WinExe - Properties - DefaultsExample - DefaultsExample - v4.0 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - false - bin\Debug\NET4\ - obj\Debug\NET4\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\NET4\ - obj\Release\NET4\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - - - - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - - - MainWindow.xaml - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - {0c6674cc-6d49-414a-9b41-d4e175028ffb} - GongSolutions.Wpf.DragDrop %28NET4%29 - - - - - \ No newline at end of file diff --git a/Examples/DefaultsExample/DemoDataTemplateSelector.cs b/Examples/DefaultsExample/DemoDataTemplateSelector.cs deleted file mode 100644 index d57dfcbc..00000000 --- a/Examples/DefaultsExample/DemoDataTemplateSelector.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Controls; - -namespace DefaultsExample { - public class DemoDataTemplateSelector : DataTemplateSelector { - public DataTemplate TemplateEven { get; set; } - public DataTemplate TemplateOdd { get; set; } - - public override DataTemplate SelectTemplate(object item, DependencyObject container) { - var str = (string)item; - Debug.Assert(str.StartsWith("Item")); - var number = Int32.Parse(str.Substring(4)); - return (number & 0x01) == 0 ? TemplateEven : TemplateOdd; - } - } -} \ No newline at end of file diff --git a/Examples/DefaultsExample/MainWindow.xaml b/Examples/DefaultsExample/MainWindow.xaml deleted file mode 100644 index 400fe09a..00000000 --- a/Examples/DefaultsExample/MainWindow.xaml +++ /dev/null @@ -1,1461 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test for Issue 42: Crash when using items deriving from ContentControl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test for MouseDoubleClick Issue 45 - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with two ListBoxes bound to two collections of the same type. - - - - - - - DragDropCopyKeyState = ControlKey - - - - - - - - - - - - - - - - - - - - - - Demonstrates the DragDropContext behaviour. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with ListBoxes and unbound collections. - - - - Item1 - Item2 - Item3 - Item4 - Item5 - - - Item6 - Item7 - Item8 - Item9 - Item10 - - - - - - - - - - - - - - - - - - Demonstrates the behaviour with a filtered and unfiltered ListBox bound to two collections of the same type. - - - Filter by %2 - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with a horizontal ListBox. - - - - - - - - - Item1 - Item2 - Item3 - Item4 - Item5 - - - - Demonstrates the default behaviour with a horizontal ListBox with right to left flow direction. - - - - - - - - - Item1 - Item2 - Item3 - Item4 - Item5 - - - - This doesn't works! (FlowDirection="RightToLeft") - - - - - - - - - - - - - - - - This works!!! (RotateTransform Angle="180") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with two ListViews bound to two collections of the same type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with DataGrids. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with TreeViews and bound collections. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the default behaviour with TreeViews and unbound collections. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Support for derived item container classes - - - - - - - - - - - - - - - - - - - - Example for PR #73: Crash on click inside ItemsControl where ItemsSource.Count == 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This example uses a DataTemplateSelector for the drag adorner. - - - - - - - - - - - - This example uses a DataTemplateSelector for the drag adorner. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demonstrates the behaviour with an ItemsControl that has a DataTemplate with an ItemsControl and Buttons inside. - - - - - - - - - - - - - - - - -