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

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. Could you please add [email blocked] as collaborator to your account?

    - Feodor

  2. Your message appears as:

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

  3. Sorry, it's feodor AT appveyor DOT com

  4. Done.

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

  6. .nuget\nuget.config

  7. 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. 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. 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. 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. Yes, its the Microsoft ASP.NET nightly build myget.org feed:

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

  12. 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. Here's both!

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

  15. 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. 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. 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. Nevermind, got it.

  19. Fixed it or was able to reproduce error?

    - Feodor

  20. 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