Restoring Components in CI Build Process

GregMartinGregMartin USMember

In order to have a project build in an automated build process in Jenkins it appears that we have to check in the components we use into source control. Is there a command, similar to the package restore for NuGet packages that can be run as part of the build process that would allow us to avoid checking in this often sizable content?


  • mattwardmattward GBMember Xamurai

    I believe you can use xamarin-component command line tool to restore the components. The download link will download an xpkg file which is a .zip file. On Windows I renamed it to .zip and extracted the xamarin-component.exe, which is a .NET application, that takes similar arguments to NuGet restore.

    xamarin-component restore Full/Path/To/YourSolution.sln

    The only extra step required is that the xamarin-component.exe needs to authenticate with Xamarin's component server to download the components. So it looks like you need to login once on the build server using xamarin-component.exe which will generate a credential (.xamarin-credentials) under the user's profile. With the credential stored you do not need to login again.

  • IainSmithIainSmith GBUniversity ✭✭

    @GregMartin Excellent! That command fixed my Jenkins build issues. Thanks!

Sign In or Register to comment.