We usually don’t keep packages and components dlls in the code repository.
Sadly, the Xamarin Studio IDE is not very good at restoring packages and components. More often than not, when someone clones a project and opens it for the first time, the IDE will not restore everything.
At this point, the common remedy is to open and close the studio several times, delete the project and re-clone it and other voodoo stuff.
I think the original motivation for these tools is CI (and we are using them for CI) but they are also quite useful on developers’ machines.
Note that the NuGet.exe utility is a special mono flavor. Apparently you can’t use the vanilla NuGet utility.
Instructions for use
Login to Component Store
To setup the xamarin component tool, you need to login with it to the component store. You do this only once and it will store your credentials info in your user folder so you don’t have to repeat it again
$ mono xamarin-component.exe login firstname.lastname@example.org Password: INFO (login): Computed cookie jar path: /Users/doron/.xamarin-credentials INFO (login): Credentials successfully stored.
To restore components, you run xamarin-component.exe with the restore option and give it the path to your solution file.
$ mono xamarin-component.exe restore MyApp.sln
To restore packages, you run NuGet.exe with the restore option and give it the path to your solution file.
$ mono NuGet.exe restore MyApp.sln
We demonstrated the use of NuGet.exe and xamarin-component.exe, 2 command line tools that enable you to manually restore packages and components.
These tools can be used either on a build server or by developers to overcome Xamarin Studio’s problems with restoring dependencies.