Forum Xamarin Cross Platform with Xamarin

Do we have to check in Components directory for TeamCity/Jenkins/CI builds?

I'm using xbuild and mdtool and they don't seem to be able to build the project if the Components directory packages are deleted. I was hoping not to have to check these files in.
You can use nuget restore to get the Packages directory to download so you don't have to check in the Packages though...


  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    You can use xamarin-component.exe to restore your components. Download it from the link and check it in with your Nuget.exe. To restore, run:

    xamarin-component restore My/Path/To/MyAwesomeApp.sln

  • KenYeeKenYee USMember ✭✭

    Forgot to mention the build server is on OSX so the .exe won't help :-(
    And the other bigger problem is if I delete the components subdirectory, loading the solution in Xamarin Studio or Visual Studio won't autoload the the missing components so people who check out the project will have to fiddle a lot to get it to work :-(

  • rmaciasrmacias USBeta, University ✭✭✭✭✭
    edited June 2015

    Yes it will, but you'll need to use the Mono runtime to execute it. It's something like:

    /Library/Frameworks/Mono.framework/Versions/Current/bin/mono --runtime=v4.0 xamarin-component.exe restore My/Path/To/MyAwesomeApp.sln

    This works on my Jenkins server on OS X. You need to execute this before your MS Build task.

  • KenYeeKenYee USMember ✭✭

    Thanks rmacias.

Sign In or Register to comment.