-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Online sources are always checked even when local exists #10367
Comments
Thanks for clarifying your scenario. Here's my output:
I made one small change. I provided a version in the consumer project. Basically what happens is that because a version was not provided, NuGet searches for the lowest applicable version, and in order to be confident that the lowest version was selected, NuGet needs to contact all sources. This is by design. |
Thanks @nkolev92 for your help and continued patience - it's really appreciated 🙂 Unfortunately, I can't specify the version, as it changes with each build. Worst, if the logic is that NuGet searches for the lowest version, then it will always pick the previously published version on nuget.org over the local package 😕 To recap, what I want is to be able to use a package that's been placed in a specific folder as part of the build in order to be able to verify that everything works with consuming it (the package has targets in it that hook in to the build process, so the integration tests verify that all of it hooks up correctly). I was hoping it should be a supported scenario (testing a package that is), but am yet to find a solution. Since there are a few issues around this, is there a process to put together a proposal (similar to csharplang)? I don't mind rolling my sleeves up and taking a stab at getting things moving if there's anything I can do to help. |
Hey @samcragg I think the fact that NuGet supports specifying no version is in my personal opinion a restriction that is too relaxed. Beyond that, #6579 is probably where the problem of testing packages locally needs to be solved. We do have a contribution process! We'd be happy to review your proposal. See https://github.com/NuGet/NuGet.Client/blob/dev/CONTRIBUTING.md for code contributions and https://github.com/NuGet/NuGet.Client/blob/dev/docs/feature-guide.md#how-do-i-know-if-i-need-a-design-for-my-work for submitting a design for your proposed change! |
Thanks for the links. I've created a design document (#10386) to hopefully get some discussion going on whether it's something that's worthwile adding (there were quite a few issues around the same theme it turns out!) |
Thanks @samcragg We really appreciate you starting the conversation toward a solution. Please note that due to it being the end of the year, many stakeholders are on vacation already/will go on vacation soon, so it might take some time to get a proper turnaround! |
When specifying local and nuget.org as sources, nuget.org is always checked even when the package exists in a local folder. This is contradictory to the documentation.
Please find the attached sample solution (NugetTest.zip), and here's the output from the command prompt (running on Linux Mint 20, but have observed the same behaviour under Windows 10):
To give some background, I want to be able to test my package before publishing it. As suggested by @nkolev92, I'm creating a separate issue from #3676 as he was quite confident the local feeds would be used before the online one, however, the above output shows a GET to nuget.org (adding nearly a second to my simple build 🙁)
The text was updated successfully, but these errors were encountered: