Skip to content

Instantly share code, notes, and snippets.

@PureWeen

PureWeen/build.sh

Last active Nov 23, 2020
Embed
What would you like to do?
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