Liero / libman-vsts-extension

Build Task for Azure DevOps Pipelines to restore libman packages
0 stars 1 forks source link

Error on pipeline #1

Open ddo88 opened 3 years ago

ddo88 commented 3 years ago

Hello I´m trying to configure libman task to restore cliente libraries, my pipeline is configurated this way

image

image

but i´m receiving this error, what can i do, thanks for your help

2021-01-29T04:08:35.0395986Z ##[section]Starting: Restore Client Side Packages
2021-01-29T04:08:35.0404561Z ==============================================================================
2021-01-29T04:08:35.0404806Z Task         : Libman
2021-01-29T04:08:35.0405003Z Description  : Restore packages defines in libman.json
2021-01-29T04:08:35.0405201Z Version      : 0.1.6
2021-01-29T04:08:35.0405361Z Author       : Daniel Turan
2021-01-29T04:08:35.0405893Z Help         : [Library Manager](https://docs.microsoft.com/en-us/aspnet/core/client-side/libman/) (LibMan) is a lightweight, client-side library acquisition tool. LibMan downloads popular libraries and frameworks from the file system or from a content delivery network (CDN). The supported CDNs include CDNJS and unpkg
2021-01-29T04:08:35.0406584Z ==============================================================================
2021-01-29T04:08:35.5679846Z Libman CLI not found. Installing..
2021-01-29T04:08:35.5701573Z [command]/usr/bin/dotnet tool install -g Microsoft.Web.LibraryManager.Cli
2021-01-29T04:08:35.5755995Z (node:4292) Warning: Use Cipheriv for counter mode of aes-256-ctr
2021-01-29T04:08:35.5757003Z (node:4292) Warning: Use Cipheriv for counter mode of aes-256-ctr
2021-01-29T04:08:35.5758019Z (node:4292) Warning: Use Cipheriv for counter mode of aes-256-ctr
2021-01-29T04:08:35.5759657Z (node:4292) Warning: Use Cipheriv for counter mode of aes-256-ctr
2021-01-29T04:08:35.5760774Z (node:4292) Warning: Use Cipheriv for counter mode of aes-256-ctr
2021-01-29T04:08:38.0386665Z Since you just installed the .NET SDK, you will need to logout or restart your session before running the tool you installed.
2021-01-29T04:08:38.0400426Z You can invoke the tool using the following command: libman
2021-01-29T04:08:38.0402742Z Tool 'microsoft.web.librarymanager.cli' (version '2.1.113') was successfully installed.
2021-01-29T04:08:38.0557176Z ##[error]Unable to locate executable file: '/home/vsts/.dotnet/tools/libman.exe'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
2021-01-29T04:08:38.0589413Z ##[section]Finishing: Restore Client Side Packages
Liero commented 3 years ago

@ddo88:

  1. Are you using Linux or Mac build agent? I've only tested on windows and it has been long time ago. Very few people were downloading this extension, so I'm not sure whether it makes sense to support it.

  2. I recommend you the official way to restore Libman packages as part of dotnet build command using <PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="...." />, see restore-files-during-build

EDIT: An alternative come to my mind: You might install the Microsoft.Web.LibraryManager.Cli global tool as a separate step, see: https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops&tabs=dotnetfive#build-your-project

  steps:
  - task: DotNetCoreCLI@2
    displayName: 'Install Libman'
    inputs:
      command: custom
      custom: tool
      arguments: 'install -g Microsoft.Web.LibraryManager.Cli'

and then invoke libman restore using Command Line task or simmilar

ddo88 commented 3 years ago

Yes was on linux agent