Adding Account NuGet Feed in Build Process

sedwards's Avatar

sedwards

14 Sep, 2017 05:47 PM

I am going to shift my question--on further research (and on finding this page: https://www.appveyor.com/docs/nuget/#configuring-external-private-nuget-feed-for-your-builds) I now understand that I need to add the source through the appveyor.yml file.

I have followed the instructions on that page, but when I run `dotnet restore` I get a 401 auth error across the board that eventually dies in an error.

Any thoughts appreciated.

---------
ORIGINAL QUESTION, NO LONGER VALID:
[Just this week we started using the NuGet Account Feed to store a couple of DLLs we need to reference in our project. The DLLs we are uploading to our Appveyor NuGet are of a lower version than the version found through the global NuGet system.

Everything works fine locally on Visual Studio because we set the Appveyor NuGet Source in our VS system and set the priority above the global NuGet system.

However, in Appveyor, I am not able to get the build to read from the account NuGet feed--it automatically finds the higher version (incorrect) DLL from the global feed and installs it.

How can I tell the Appveyor Build process (in appveyor.yml) what NuGet feeds to use and in what order?]

Thanks!

  1. 1 Posted by Ilya Finkelshte... on 14 Sep, 2017 11:16 PM

    Ilya Finkelshteyn's Avatar

    This updated setting is needed if you are going to use external nuget feed, meaning nuget feed from different account. For your case

    nuget:
      account_feed: true
    
    should work. Could you please revert to this and run nuget sources command and share output with us.
  2. 2 Posted by sedwards on 15 Sep, 2017 01:42 PM

    sedwards's Avatar

    OK, I gave that a try (I didn't think about running nuget sources in my build scripts). It also proves my issue:

    nuget sources
    Registered Sources:
      1.  nuget.org [Enabled]
          https://www.nuget.org/api/v2
      2.  AppVeyorAccountFeed [Enabled]
          https://ci.appveyor.com/nuget/wvh-shanee-9q3n3q50144t
      3.  Microsoft Visual Studio Offline Packages [Enabled]
          C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
    dotnet --version
    

    As you can see, the NuGet V2 feed is used before the appveyor account feed. Since my Appveyor account feed contains a DLL of version 4.0.0 and the V2 contains a 4.0.6 it is defaulting to the higher version (which my app can't use).

  3. 3 Posted by sedwards on 15 Sep, 2017 02:19 PM

    sedwards's Avatar

    Alright, I've had tunnel vision on this and been going about it all wrong. We are just going to push our package up with a different package name so the version numbers don't conflict. I've been too close to the problem.

    Thanks for the assistance!

  4. sedwards closed this discussion on 15 Sep, 2017 02:19 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac