diff --git a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 index 4e7224021e..0c825cb706 100644 --- a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 +++ b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 @@ -102,6 +102,10 @@ function installModule([string]$moduleName, [string]$version, $repoUrl) { throw "Failed to install module $moduleName with version $version" } + # Unregister repository as it can cause overlap issues with `dotnet tool install` + # commands using the same devops feed + Unregister-PSRepository -Name $repoUrl + return $modules[0] }