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.
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
Support Staff 1 Posted by Feodor Fitsner on 02 Jun, 2014 03:33 PM
Could you please add [email blocked] as collaborator to your account?
- Feodor
2 Posted by David Pfeffer on 02 Jun, 2014 04:41 PM
Your message appears as:
"Could you please add [email blocked] as collaborator to your account?"
Support Staff 3 Posted by Feodor Fitsner on 02 Jun, 2014 04:48 PM
Sorry, it's feodor AT appveyor DOT com
4 Posted by David Pfeffer on 02 Jun, 2014 05:42 PM
Done.
Support Staff 5 Posted by Feodor Fitsner on 02 Jun, 2014 06:05 PM
In what place do you have configured alternate source for NuGet?
6 Posted by David Pfeffer on 02 Jun, 2014 06:43 PM
.nuget\nuget.config
Support Staff 7 Posted by Feodor Fitsner on 02 Jun, 2014 06:51 PM
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) innuget restore
command.Support Staff 8 Posted by Feodor Fitsner on 02 Jun, 2014 06:52 PM
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 Posted by David Pfeffer on 02 Jun, 2014 08:21 PM
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.)
Support Staff 10 Posted by Feodor Fitsner on 02 Jun, 2014 11:49 PM
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 Posted by David Pfeffer on 03 Jun, 2014 01:22 AM
Yes, its the Microsoft ASP.NET nightly build myget.org feed:
https://www.myget.org/F/aspnetwebstacknightly/
Support Staff 12 Posted by Feodor Fitsner on 03 Jun, 2014 01:35 AM
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 Posted by David Pfeffer on 03 Jun, 2014 02:21 AM
Here's both!
Support Staff 14 Posted by Feodor Fitsner on 03 Jun, 2014 04:03 AM
OK, great. Will give it a try tomorrow and let you know about the results.
Support Staff 15 Posted by Feodor Fitsner on 03 Jun, 2014 11:34 PM
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 Posted by David Pfeffer on 06 Jun, 2014 01:16 PM
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 Posted by David Pfeffer on 06 Jun, 2014 01:28 PM
Here's an example of this working in
Works.PNG
. Thenuget.config
file andpackages.config
is exactly the same as what I sent to you.18 Posted by David Pfeffer on 06 Jun, 2014 02:11 PM
Nevermind, got it.
Support Staff 19 Posted by Feodor Fitsner on 06 Jun, 2014 02:13 PM
Fixed it or was able to reproduce error?
- Feodor
Support Staff 20 Posted by Feodor Fitsner on 06 Jun, 2014 04:51 PM
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
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:44 AM.