问题
The guide here gives the example code below:
- task: DotNetCoreCLI@2
inputs:
command: restore
projects: '**/*.csproj'
feedsToUse: config
nugetConfigPath: NuGet.config # Relative to root of the repository
externalFeedCredentials: <Name of the NuGet service connection>
but I'm struggling to know what is required in place of <Name of the NuGet service connection>
or even NuGet.config
.
The Guide on Artifactory doesn't use YAML or even mention it so I don't know if it is even possible.
My question: Is the above possible, and if so, what should I have in the script above?
回答1:
<Name of the NuGet service connection>
is exactly what it says. Go create a service connection in your project that points to the NuGet feed, then reference it by name there.
来源:https://stackoverflow.com/questions/54791887/how-to-restore-packages-from-artifactory-using-yaml