AzureDevOpsExtension icon indicating copy to clipboard operation
AzureDevOpsExtension copied to clipboard

Shipped version of Pester module is missing its assemblies

Open edcroes opened this issue 2 years ago • 0 comments

Where are you running it?

Azure DevOps Server 2022.0.1

Version of Extension/Task

Latest (10.3.10)

Expected behaviour and actual behaviour

We're using a self-hosted agent on Windows Server 2022

  • Without the Pester module installed
  • Without PSGet configured
  • Offline

Using this task in a pipeline will result in the following error (running with PSCore):

##[warning]Falling back to version of Pester shipped with extension. To use a newer version please update the version of PowerShellGet available on this machine.
##[error]Add-Type: Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path
##[error]Add-Type: Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path
##[error]'H:\b\1\_tasks\Pester_cca5462b-887d-4617-bf3f-dcf0d3c622e9\10.3.10\5.0.1\bin\netstandard2.0\Pester.dll' because it does
not exist."

Note that this will also fail when using PowerShell instead of PSCore since the entire bin folder is missing from the task. To resolve this the Pester bin folder should also be added to the task.

Steps to reproduce the problem

  • Use a machine without internet
  • Have no registries registered in PSGet (or one that cannot be accessed)
  • Run the task on random tests

edcroes avatar Dec 13 '23 12:12 edcroes