Skip to content

Instantly share code, notes, and snippets.

@PureWeen
Last active November 23, 2020 07:40
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PureWeen/92c1e1aff0c257c3decf0bcb8d6e9296 to your computer and use it in GitHub Desktop.
Save PureWeen/92c1e1aff0c257c3decf0bcb8d6e9296 to your computer and use it in GitHub Desktop.
Building Xamarin Forms on Mac
#!/bin/bash
# If you are on Visual Studio for Mac 2017 Turn off automatic package restore before running this script
# If you are on Visual Studio for Mac 2019 you do not need to turn off automatic package restore
# Visual Studio => Preferences => Nuget => General => uncheck the Package Restore box
# Needing to turn restore off isn't necessary in the latest preview releases of VS Mac
# Clean
git clean -dxf
# NuGet restore
msbuild /t:restore Xamarin.forms.sln
# Build XF build tasks
msbuild Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
# ensure resources are all in sync otherwise first run might cause a Resource ID not found error
msbuild Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj /t:rebuild
# open in vsmac and should be able to build/run from here
open Xamarin.Forms.sln
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment