Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Majcica authored and Mario Majcica committed Dec 7, 2023
1 parent e5af37f commit c13b6d6
Show file tree
Hide file tree
Showing 27 changed files with 764 additions and 620 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The desired Visual Studio version needs to be present on your build server.

## Release notes

* 2.0.4 - Added support for VS2022. Updated dependencies. Removed support for VS2015 and below versions.
* 2.0.3 - Updated Task Library to v0.11.0. Updated VSSetup library to v2.2.5. Added the support for VS2019. Added extra Project filed/parameter. Solution parameter now supports wildcards [#1](https://github.com/mmajcica/DevEnvBuild/issues/1).
* 1.0.2 - Minor improvements on the extension. No task changes
* 1.0.1 - Initial Release
Expand Down
Binary file added task/ps_modules/VSSetup/.signature.p7s
Binary file not shown.
Binary file not shown.
374 changes: 188 additions & 186 deletions task/ps_modules/VSSetup/VSSetup.psd1

Large diffs are not rendered by default.

369 changes: 186 additions & 183 deletions task/ps_modules/VSSetup/VSSetup.psm1

Large diffs are not rendered by default.

366 changes: 184 additions & 182 deletions task/ps_modules/VSSetup/VSSetup.types.ps1xml

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion task/ps_modules/VstsTaskSdk/FindFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function Find-Match {
$findResults += $findPath
}
} else {
$findResults = Get-FindResult -Path $findPath -Options $FindOptions
$findResults = @( Get-FindResult -Path $findPath -Options $FindOptions )
}

Write-Verbose "Found $($findResults.Count) paths."
Expand Down
2 changes: 1 addition & 1 deletion task/ps_modules/VstsTaskSdk/LegacyFindFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function Find-Files {
}

# Validate pattern does not end with a \.
if ($pattern[$pattern.Length - 1] -eq [System.IO.Path]::DirectorySeparatorChar) {
if ($pattern.EndsWith([System.IO.Path]::DirectorySeparatorChar)) {
throw (Get-LocString -Key PSLIB_InvalidPattern0 -ArgumentList $pattern)
}

Expand Down
4 changes: 2 additions & 2 deletions task/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function Get-LocString {

<#
.SYNOPSIS
Imports resource strings for use with Get-VstsLocString.
Imports resource strings for use with GetVstsLocString.
.DESCRIPTION
Imports resource strings for use with Get-VstsLocString. The imported strings are stored in an internal resource string dictionary. Optionally, if a separate resource file for the current culture exists, then the localized strings from that file then imported (overlaid) into the same internal resource string dictionary.
Imports resource strings for use with GetVstsLocString. The imported strings are stored in an internal resource string dictionary. Optionally, if a separate resource file for the current culture exists, then the localized strings from that file then imported (overlaid) into the same internal resource string dictionary.
Resource strings from the SDK are prefixed with "PSLIB_". This prefix should be avoided for custom resource strings.
Expand Down
63 changes: 35 additions & 28 deletions task/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,41 @@ function Write-UpdateReleaseName {
Write-LoggingCommand -Area 'release' -Event 'updatereleasename' -Data $Name -AsOutput:$AsOutput
}

<#
.SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
.PARAMETER AsOutput
Indicates whether to write the logging command directly to the host or to the output pipeline.
#>
function Write-LoggingCommand {
[CmdletBinding(DefaultParameterSetName = 'Parameters')]
param(
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Area,
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Event,
[Parameter(ParameterSetName = 'Parameters')]
[string]$Data,
[Parameter(ParameterSetName = 'Parameters')]
[hashtable]$Properties,
[Parameter(Mandatory = $true, ParameterSetName = 'Object')]
$Command,
[switch]$AsOutput)

if ($PSCmdlet.ParameterSetName -eq 'Object') {
Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput
return
}

$command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
if ($AsOutput) {
$command
} else {
Write-Host $command
}
}

########################################
# Private functions.
########################################
Expand Down Expand Up @@ -498,34 +533,6 @@ function Format-LoggingCommand {
$sb.Append(']').Append($Data).ToString()
}

function Write-LoggingCommand {
[CmdletBinding(DefaultParameterSetName = 'Parameters')]
param(
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Area,
[Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
[string]$Event,
[Parameter(ParameterSetName = 'Parameters')]
[string]$Data,
[Parameter(ParameterSetName = 'Parameters')]
[hashtable]$Properties,
[Parameter(Mandatory = $true, ParameterSetName = 'Object')]
$Command,
[switch]$AsOutput)

if ($PSCmdlet.ParameterSetName -eq 'Object') {
Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput
return
}

$command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
if ($AsOutput) {
$command
} else {
Write-Host $command
}
}

function Write-LogIssue {
[CmdletBinding()]
param(
Expand Down
Binary file removed task/ps_modules/VstsTaskSdk/PSGetModuleInfo.xml
Binary file not shown.
45 changes: 35 additions & 10 deletions task/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Only a subset of the referenced assemblies may actually be required, depending o
Walks an assembly's references to determine all of it's dependencies. Also walks the references of the dependencies, and so on until all nested dependencies have been traversed. Dependencies are searched for in the directory of the specified assembly. NET Framework assemblies are omitted.
See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
.PARAMETER LiteralPath
Assembly to walk.
Expand Down Expand Up @@ -106,14 +106,14 @@ The agent job token is used to construct the credentials object. The identity as
Refer to Get-VstsTfsService for a more simple to get a TFS service object.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
.PARAMETER OMDirectory
Directory where the extended client object model DLLs are located. If the DLLs for the credential types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory.
If not specified, defaults to the directory of the entry script for the task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
.EXAMPLE
#
Expand All @@ -139,6 +139,31 @@ function Get-TfsClientCredentials {
# Get the endpoint.
$endpoint = Get-Endpoint -Name SystemVssConnection -Require

# Test if the Newtonsoft.Json DLL exists in the OM directory.
$newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll")
Write-Verbose "Testing file path: '$newtonsoftDll'"
if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) {
Write-Verbose 'Not found. Rethrowing exception.'
throw
}

# Add a binding redirect and try again. Parts of the Dev15 preview SDK have a
# dependency on the 6.0.0.0 Newtonsoft.Json DLL, while other parts reference
# the 8.0.0.0 Newtonsoft.Json DLL.
Write-Verbose "Adding assembly resolver."
$onAssemblyResolve = [System.ResolveEventHandler] {
param($sender, $e)

if ($e.Name -like 'Newtonsoft.Json, *') {
Write-Verbose "Resolving '$($e.Name)' to '$newtonsoftDll'."

return [System.Reflection.Assembly]::LoadFrom($newtonsoftDll)
}

return $null
}
[System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve)

# Validate the type can be found.
$null = Get-OMType -TypeName 'Microsoft.TeamFoundation.Client.TfsClientCredentials' -OMKind 'ExtendedClient' -OMDirectory $OMDirectory -Require

Expand All @@ -162,7 +187,7 @@ Gets a TFS extended client service.
.DESCRIPTION
Gets an instance of an ITfsTeamProjectCollectionObject.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
.PARAMETER TypeName
Namespace-qualified type name of the service to get.
Expand All @@ -172,7 +197,7 @@ Directory where the extended client object model DLLs are located. If the DLLs f
If not specified, defaults to the directory of the entry script for the task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task.
.PARAMETER Uri
URI to use when initializing the service. If not specified, defaults to System.TeamFoundationCollectionUri.
Expand Down Expand Up @@ -239,14 +264,14 @@ The agent job token is used to construct the credentials object. The identity as
Refer to Get-VstsVssHttpClient for a more simple to get a VSS HTTP client.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
.PARAMETER OMDirectory
Directory where the REST client object model DLLs are located. If the DLLs for the credential types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory.
If not specified, defaults to the directory of the entry script for the task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
.EXAMPLE
#
Expand Down Expand Up @@ -306,7 +331,7 @@ Gets a VSS HTTP client.
.DESCRIPTION
Gets an instance of an VSS HTTP client.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
.PARAMETER TypeName
Namespace-qualified type name of the HTTP client to get.
Expand All @@ -316,7 +341,7 @@ Directory where the REST client object model DLLs are located. If the DLLs for t
If not specified, defaults to the directory of the entry script for the task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task.
# .PARAMETER Uri
# URI to use when initializing the HTTP client. If not specified, defaults to System.TeamFoundationCollectionUri.
Expand Down Expand Up @@ -475,7 +500,7 @@ VstsTaskSdk.VstsWebProxy implement System.Net.IWebProxy interface.
.EXAMPLE
$webProxy = Get-VstsWebProxy
$webProxy.GetProxy(New-Object System.Uri("https://github.com/Microsoft/vsts-task-lib"))
$webProxy.GetProxy(New-Object System.Uri("https://github.com/Microsoft/azure-pipelines-task-lib"))
#>
function Get-WebProxy {
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Fehler beim Aufzählen von Unterverzeichnissen für den folgenden Pfad: \"{0}\"",
"loc.messages.PSLIB_FileNotFound0": "Die Datei wurde nicht gefunden: \"{0}\".",
"loc.messages.PSLIB_Input0": "\"{0}\"-Eingabe",
"loc.messages.PSLIB_InvalidPattern0": "Ungültiges Muster: \"{0}\"",
"loc.messages.PSLIB_InvalidPattern0": "Der Pfad darf nicht mit einem Verzeichnistrennzeichen enden: „{0}",
"loc.messages.PSLIB_LeafPathNotFound0": "Der Blattpfad wurde nicht gefunden: \"{0}\".",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "Fehler bei der Normalisierung bzw. Erweiterung des Pfads. Die Pfadlänge wurde vom Kernel32-Subsystem nicht zurückgegeben für: \"{0}\"",
"loc.messages.PSLIB_PathNotFound0": "Der Pfad wurde nicht gefunden: \"{0}\".",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "No se pudieron enumerar los subdirectorios de la ruta de acceso: '{0}'",
"loc.messages.PSLIB_FileNotFound0": "Archivo no encontrado: '{0}'",
"loc.messages.PSLIB_Input0": "Entrada '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "Patrón no válido: '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "La ruta de acceso no puede terminar con un carácter separador de directorios: '{0}'",
"loc.messages.PSLIB_LeafPathNotFound0": "No se encuentra la ruta de acceso de la hoja: '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "No se pudo normalizar o expandir la ruta de acceso. El subsistema Kernel32 no devolvió la longitud de la ruta de acceso para: '{0}'",
"loc.messages.PSLIB_PathNotFound0": "No se encuentra la ruta de acceso: '{0}'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Échec de l'énumération des sous-répertoires pour le chemin : '{0}'",
"loc.messages.PSLIB_FileNotFound0": "Fichier introuvable : {0}.",
"loc.messages.PSLIB_Input0": "Entrée '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "Modèle non valide : '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "Le chemin d’accès ne peut pas se terminer par un caractère de séparateur de répertoire : « {0} »",
"loc.messages.PSLIB_LeafPathNotFound0": "Le chemin feuille est introuvable : '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "Échec de la normalisation/l'expansion du chemin. La longueur du chemin n'a pas été retournée par le sous-système Kernel32 pour : '{0}'",
"loc.messages.PSLIB_PathNotFound0": "Chemin introuvable : '{0}'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "L'enumerazione delle sottodirectory per il percorso '{0}' non è riuscita",
"loc.messages.PSLIB_FileNotFound0": "File non trovato: '{0}'",
"loc.messages.PSLIB_Input0": "Input di '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "Criterio non valido: '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "Il percorso non può terminare con un carattere separatore di directory: '{0}'",
"loc.messages.PSLIB_LeafPathNotFound0": "Percorso foglia non trovato: '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "La normalizzazione o l'espansione del percorso non è riuscita. Il sottosistema Kernel32 non ha restituito la lunghezza del percorso per '{0}'",
"loc.messages.PSLIB_PathNotFound0": "Percorso non trovato: '{0}'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "パス '{0}' のサブディレクトリを列挙できませんでした",
"loc.messages.PSLIB_FileNotFound0": "ファイルが見つかりません: '{0}'",
"loc.messages.PSLIB_Input0": "'{0}' 入力",
"loc.messages.PSLIB_InvalidPattern0": "使用できないパターンです: '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "パスの末尾をディレクトリ区切り文字にすることはできません: '{0}'",
"loc.messages.PSLIB_LeafPathNotFound0": "リーフ パスが見つかりません: '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "パスの正規化/展開に失敗しました。Kernel32 サブシステムからパス '{0}' の長さが返されませんでした",
"loc.messages.PSLIB_PathNotFound0": "パスが見つかりません: '{0}'",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"loc.messages.PSLIB_AgentVersion0Required": "에이전트 버전 {0} 이상이 필요합니다.",
"loc.messages.PSLIB_ContainerPathNotFound0": "컨테이너 경로를 찾을 수 없음: '{0}'",
"loc.messages.PSLIB_EndpointAuth0": "'{0}' 서비스 끝점 자격 증명",
"loc.messages.PSLIB_EndpointUrl0": "'{0}' 서비스 끝점 URL",
"loc.messages.PSLIB_EndpointAuth0": "'{0}' 서비스 엔드포인트 자격 증명",
"loc.messages.PSLIB_EndpointUrl0": "'{0}' 서비스 엔드포인트 URL",
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "경로에 대해 하위 디렉터리를 열거하지 못함: '{0}'",
"loc.messages.PSLIB_FileNotFound0": "{0} 파일을 찾을 수 없습니다.",
"loc.messages.PSLIB_Input0": "'{0}' 입력",
"loc.messages.PSLIB_InvalidPattern0": "잘못된 패턴: '{0}'",
"loc.messages.PSLIB_InvalidPattern0": "경로는 디렉터리 구분 문자로 끝날 수 없습니다. '{0}'",
"loc.messages.PSLIB_LeafPathNotFound0": "Leaf 경로를 찾을 수 없음: '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "경로 정규화/확장에 실패했습니다. 다음에 대해 Kernel32 subsystem에서 경로 길이를 반환하지 않음: '{0}'",
"loc.messages.PSLIB_PathNotFound0": "경로를 찾을 수 없음: '{0}'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"loc.messages.PSLIB_EndpointAuth0": "Учетные данные конечной точки службы \"{0}\"",
"loc.messages.PSLIB_EndpointUrl0": "URL-адрес конечной точки службы \"{0}\"",
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Сбой перечисления подкаталогов для пути: \"{0}\".",
"loc.messages.PSLIB_FileNotFound0": "Файл не найден: \"{0}\".",
"loc.messages.PSLIB_FileNotFound0": "Файл не найден: \"{0}\"",
"loc.messages.PSLIB_Input0": "Входные данные \"{0}\".",
"loc.messages.PSLIB_InvalidPattern0": "Недопустимый шаблон: \"{0}\".",
"loc.messages.PSLIB_InvalidPattern0": "Путь не может заканчиваться символом разделителя каталогов: \"{0}\"",
"loc.messages.PSLIB_LeafPathNotFound0": "Путь к конечному объекту не найден: \"{0}\".",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "Сбой нормализации и расширения пути. Длина пути не была возвращена подсистемой Kernel32 для: \"{0}\".",
"loc.messages.PSLIB_PathNotFound0": "Путь не найден: \"{0}\".",
Expand Down
Loading

0 comments on commit c13b6d6

Please sign in to comment.