You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem
# Outside of shell | |
# - Create project directory | |
# - git init | |
# - open in vs code >code . | |
# - Using remote container extensions create new development container | |
# - Using dotnet core 3.1 or later container template | |
# - Re-open in container and run the script below | |
dotnet new sln | |
dotnet new xunit -n Application.IntegrationTests -o ./tests/Application.IntegrationTests |
You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem
function Test-Function { | |
[OutputType([String])] | |
[CmdletBinding( | |
SupportsShouldProcess=$true, | |
ConfirmImpact="None" | |
)] | |
param ( | |
[Parameter(Position=1, Mandatory=$true, ValueFromPipeline=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$Name |
function Test-TimedProcessFunction { | |
[OutputType([String])] | |
[CmdletBinding( | |
SupportsShouldProcess=$true, | |
ConfirmImpact="None" | |
)] | |
param ( | |
[Parameter(Position=1, Mandatory=$true, ValueFromPipeline=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$Name, |
Include ".\references.ps1" | |
properties { | |
$dir = @{ | |
msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319"; | |
src = (Join-Path -Path $psake.build_script_dir -ChildPath '..' | Get-Item).FullName; | |
} | |
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] | |
$tool = @{ | |
msbuild = (Join-Path -Path 'C:\Program Files (x86)\MSBuild\14.0\Bin' -ChildPath 'MSBuild.exe' | Get-Item).FullName; |
function Add-HostFileEntry { | |
[OutputType([String])] | |
[CmdletBinding( | |
SupportsShouldProcess=$true, | |
ConfirmImpact="Medium")] | |
param ( | |
[Parameter(Position=1, Mandatory=$true)] | |
[ValidateNotNullOrEmpty()] | |
[ValidatePattern("(?# Valid IP Address range 1.1.1.1 - 255.255.255.255)\A(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\z")] |
properties { | |
$dir = @{ | |
base = (Get-Item -Path $psake.build_script_dir).FullName; | |
src = (Get-Item -Path (Join-Path -Path $psake.build_script_dir -ChildPath '..\')).FullName; | |
bin = Join-Path -Path $psake.build_script_dir -ChildPath "bin"; | |
} | |
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] | |
$tool = @{ | |
mstest = (Get-Item -Path "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe").FullName; | |
} |
[Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
[Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
[Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Lab.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
[Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Lab.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
[Reflection.Assembly]::Load(“Microsoft.TeamFoundation.VersionControl.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
$tfsCollectionUrl = New-Object System.URI("http://TFSServer:8080/tfs/CollectionName/"); | |
$tfsCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($tfsCollectionUrl); | |
$versionControl = $tfsCollection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]); |