NuGet Package Restore doesn't seem to work with multiple package sources

David Pfeffer's Avatar

David Pfeffer

02 Jun, 2014 03:15 PM

Take a look at the build log for:
https://ci.appveyor.com/project/bytenik/funnelfire/build/1.0.18

It cannot find packages that DO exist because it doesn't look in the alternate nuget repo; it only looks in the first one.
If I leave out the official repository at nuget.org, it fails to build due to missing packages. I SHOULD be able to leave out the official repo and have it picked up due to inheritance.

As a result, I cannot find a configuration setup that allows AppVeyor to restore my packages.

On a local machine, this builds just fine as currently written, as well as when leaving out the official nuget repo.

  1. Support Staff 1 Posted by Feodor Fitsner on 02 Jun, 2014 03:33 PM

    Feodor Fitsner's Avatar

    Could you please add [email blocked] as collaborator to your account?

    - Feodor

  2. 2 Posted by David Pfeffer on 02 Jun, 2014 04:41 PM

    David Pfeffer's Avatar

    Your message appears as:

    "Could you please add [email blocked] as collaborator to your account?"

  3. Support Staff 3 Posted by Feodor Fitsner on 02 Jun, 2014 04:48 PM

    Feodor Fitsner's Avatar

    Sorry, it's feodor AT appveyor DOT com

  4. 4 Posted by David Pfeffer on 02 Jun, 2014 05:42 PM

    David Pfeffer's Avatar

    Done.

  5. Support Staff 5 Posted by Feodor Fitsner on 02 Jun, 2014 06:05 PM

    Feodor Fitsner's Avatar

    In what place do you have configured alternate source for NuGet?

  6. 6 Posted by David Pfeffer on 02 Jun, 2014 06:43 PM

    David Pfeffer's Avatar

    .nuget\nuget.config

  7. Support Staff 7 Posted by Feodor Fitsner on 02 Jun, 2014 06:51 PM

    Feodor Fitsner's Avatar

    Hm...I see. My guess would be nuget restore doesn't not pick up sources from that config file. '.nuget' folder is for VS-based NuGet restore. I would try the following:

    1) remove nuget restore command and rely on VS restore during the build (AppVeyor already sets NuGet restore consent variable).

    2) explicitly specify all sources (-Source parameter) in nuget restore command.

  8. Support Staff 8 Posted by Feodor Fitsner on 02 Jun, 2014 06:52 PM

    Feodor Fitsner's Avatar

    Also, I did notice AppVeyor runs builds not in the same order they were submitted. I'm going to fix this problem and deploy update...

  9. 9 Posted by David Pfeffer on 02 Jun, 2014 08:21 PM

    David Pfeffer's Avatar

    Actually, it definitely uses the configuration file. If I remove the
    nuget.org repo or change the order, it fails to build because it cannot
    find all the standard packages (only the ones on the myget.org repo are
    then found.)

  10. Support Staff 10 Posted by Feodor Fitsner on 02 Jun, 2014 11:49 PM

    Feodor Fitsner's Avatar

    OK, let's continue. We are not giving up on you yet! :)

    Is that alternate NuGet feed public, can I play with it?

    Another thing to try is to do a small fake project just to test how packages are being downloaded. Disable build and test stages and then use nuget install <package-from-alternate-feed> -Source <alternate-feed> as a build script.

  11. 11 Posted by David Pfeffer on 03 Jun, 2014 01:22 AM

    David Pfeffer's Avatar

    Yes, its the Microsoft ASP.NET nightly build myget.org feed:

    https://www.myget.org/F/aspnetwebstacknightly/

  12. Support Staff 12 Posted by Feodor Fitsner on 03 Jun, 2014 01:35 AM

    Feodor Fitsner's Avatar

    OK, great. Can you also share your nuget.config and packages.config - I'd like to build a small project to reproduce scenario?

    - Feodor

  13. 13 Posted by David Pfeffer on 03 Jun, 2014 02:21 AM

    David Pfeffer's Avatar

    Here's both!

  14. Support Staff 14 Posted by Feodor Fitsner on 03 Jun, 2014 04:03 AM

    Feodor Fitsner's Avatar

    OK, great. Will give it a try tomorrow and let you know about the results.

  15. Support Staff 15 Posted by Feodor Fitsner on 03 Jun, 2014 11:34 PM

    Feodor Fitsner's Avatar

    OK, I managed to reproduce the problem locally. It's the package in question which does not exists in that feed. See attached screenshots.

  16. 16 Posted by David Pfeffer on 06 Jun, 2014 01:16 PM

    David Pfeffer's Avatar

    Where did that packages.txt file come from?

    If you add the NuGet repository we're using from https://www.myget.org/gallery/aspnetwebstacknightly/ to your local machine, nuget is able to find that package.

  17. 17 Posted by David Pfeffer on 06 Jun, 2014 01:28 PM

    David Pfeffer's Avatar

    Here's an example of this working in Works.PNG. The nuget.config file and packages.config is exactly the same as what I sent to you.

  18. 18 Posted by David Pfeffer on 06 Jun, 2014 02:11 PM

    David Pfeffer's Avatar

    Nevermind, got it.

  19. Support Staff 19 Posted by Feodor Fitsner on 06 Jun, 2014 02:13 PM

    Feodor Fitsner's Avatar

    Fixed it or was able to reproduce error?

    - Feodor

  20. Support Staff 20 Posted by Feodor Fitsner on 06 Jun, 2014 04:51 PM

    Feodor Fitsner's Avatar

    Yes, I got that list by running nuget list command against that feed.

    Btw, make sure you don't have that package locally cached %LocalAppData%\NuGet\Cache

  21. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:44 AM.

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