Azure Devops pipeline - Getting dotnet tools (customer command) to run



Often have problem when there is more than a feed config in your nuget.config. For example, having your private feed, dotnet custom tool like "dotnet tool install' just won't work.

To resolve this you specify a --configfile and provide a single config file entry called dotnettool.config which has the content below :-


  - taskDotNetCoreCLI@2
    displayNameInstall ReportGenerator tool
    inputs:
      commandcustom
      customtool
      argumentsinstall --tool-path . dotnet-reportgenerator-globaltool 
--configfile dotnettool.config
      feedsToUse'select'

dotnettool.config content

xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear/>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm