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 :-
- task: DotNetCoreCLI@2
displayName: Install ReportGenerator tool
inputs:
command: custom
custom: tool
arguments: install --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