Using KPM offline should succeed if all dependencies are already available #591
Comments
How does it fail today? I could see this being downgraded to a warning if you had a version on disk that matches your criteria with an added flag --ignore-failed-sources |
|
Yeah definitely have to warn the user. A wildcard spec means "give me the best one given the version resolve algorithm" but that can't be known without know the full set of packages at each source. |
If we have partial information (some or all of the feeds are not available) then:
|
Note that Visual Studio works fine offline. What logic do they use for package restore? |
KPM options is something that's on the list for VS. I don't think this will be on by default. Maybe if kpm restore fails with a particular exit code, VS can prompt and ask if you want to flip this flag /cc @PradeepKadubandi @sayedihashimi |
How to install all the necessary packages by kpm if necessary packages are not install on the machine and nor present in \User\userName.kpm\packages folder. |
@jkyadav , simply do |
Hi @ChengTian I have kpm I tried to restore packages with kpm restore but it throws exception. |
See this even this failing for System.IO as well..
|
Disable the api.nuget.org feed. |
Thanks @davidfowl , its worked but failing now for this .. kpm : 'npm' is not recognized as an internal or external command,
operable program or batch file. What is wrong with this.. |
You need to install node and npm |
Thanks @davidfowl kpm restore worked, but still I am getting npm related error, trying to fix it. |
KPM restore fails if run offline (no internet connection), even if all the necessary packages are already installed. KPM restore is a standard build step. This prevents build (& test) from being run offline. This reproduces in any of our repositories.
Expected:
Observed:
The text was updated successfully, but these errors were encountered: