1
votes

i am working with Azure Pipelines recently and i have a NuGet Task inside my Build process. This progress always fails, because there is no package called "BotUtility" inside the NuGet source. That is caused because this package is created by myself and is stored in Azure Artifacts only.

##[error]The nuget command failed with exit code(1) and error(NU1101: Unable to find package BotUtility. No packages exist with this id in source(s): NuGetOrg

Is it possible for the Build Pipeline to reach this package inside Azure Artifacts and if so, how can i implement this? Can i add the package feed source in the Pipeline config?

enter image description here There is a more detailed screenshot of the error location.

enter image description here Here is my current version of the Build pipeline.

1

1 Answers

3
votes

Well you can add your nuget feed to the nuget task;

enter image description here

Another way is to define a nuget.config in your project, and add your package there:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

  <!-- NuGet packages are now stored globally, see: https://stackoverflow.com/a/35809007/4122889 -->
  <!-- see: https://stackoverflow.com/a/53451805/4122889 -->
  <config>
    <add key="globalPackagesFolder" value=".\Packages" />
    <add key="repositoryPath" value=".\Packages" />
  </config>

  <!-- Setup for local packages, not in a nuget source -->
  <packageSources>
    <add key="MY_FEED" value="https://pkgs.dev.azure.com/org/project/_packaging/MY_FEED/nuget/v3/index.json" />
    <!--<add key="LocalPackages" value="./LocalPackages" />-->

  </packageSources>
  <activePackageSource>
    <!-- this tells that all of them are active -->
    <!--<add key="All" value="(Aggregate source)" />-->
  </activePackageSource>

</configuration>