-
Notifications
You must be signed in to change notification settings - Fork 255
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
"dotnet restore" doesn't restore all required dependent lib versions #6309
Comments
This is by design. In the 2.0 SDK, we started using the NuGetFallback folder as a way to improve performance and avoid hitting the network too much. This fallback folder contains a set of packages, including newtonsoft.json 9.0.1 and when NuGet runs a dotnet restore, if it finds the package in the fallback folder, it uses it and does not copy the package to the user's cache. Which is what you are seeing above. Given that the system is behaving exactly as we expect it to, I am going to close this issue. If you still have any questions or comments, please just re-activate or comment. |
From @davethieben on December 13, 2017 18:22 that makes sense. however, then I would argue that the "--packages" cli option isn't working correctly. I am assuming that the point of that option (and what we have been using it for) is to restore ALL packages to the output location specified, which it does not, even given a "--force" option. |
I will move this issue to NuGet as it will be easier to get an accurate explanation for their reasoning there. |
@davethieben would you explain more about your scenario? Why do you need the packages in a certain location, are you using these outside of the normal project restore/build? The workaround for this is to disable the fallback folders so that only the packages folder is used. |
we are distributing our app via an internal NuGet server, and need to publish all dependent packages to the server as well. if there is a better way to do that, lmk. re: workaround; how to disable the fallback folder? thanks. |
|
@livarcocc , can i disable fallback repository? Because, ms build find old version (for example, ver 5.2.0) of package from this folder. But at my local repo i use new version (5.2.1). And i want that all my services uses this version of package. But the problem is, that nobody use this problem package directly. All of services uses this from another packages. |
From @davethieben on December 13, 2017 14:11
My project is referencing a newer version of Newtownsoft.Json, and an old library that references an older Newtonsoft.Json package. in the 2.0 SDK, when I "dotnet restore", I am only getting the old version. I did not have this problem with the 1.0 SDK.
Steps to reproduce
Expected behavior
In the "pkgs" dir, I should see "newtonsoft.json" with both "6.0.4" and "9.0.1" dirs.
Actual behavior
I am only getting the "6.0.4" dir.
Additional steps
Environment data
Output from when I performed these steps:
And after adding the global.json
Am I missing something? thanks.
Copied from original issue: dotnet/cli#8233
The text was updated successfully, but these errors were encountered: