The ruthless El Capitan

I have been having some painful issues when dealing with Xamarin Studio and El Capitan. I thought I would summarize some of the workaround I’ve had to do to just get things to build again. Note that I haven’t checked any of these for robustness, but these are just the things I did to get my projects building again.

  1. usr/local had its permissions changed to root:wheel.  If you have sudo privileges this is an easy fix.  You can run sudo chown `whoami` /usr/local
  2. The references to various targets files (e.g. Xamarin.iOS.CSharp.Targets) got all screwed up, so basically uninstall and reinstall Xamarin studio
  3. Xamarin Studio cannot find mono anymore.  As you can imagine, this is a ridiculous mess.  If you use nuget you will notice this.  The solution I have taken is to erase all the NuGet.targets references (they are deprecated anyway) and anywhere I use “mono” I have to replace it with $(MonoPrefix) which I define like this:
    <MonoPrefix Condition=" '$(OS)' == 'Windows_NT' "></MonoPrefix>
    <!-- Silly workaround for OS X 10.11 -->
    <MonoPrefix Condition=" Exists('/Library/Frameworks/Mono.framework/Commands/mono') ">/Library/Frameworks/Mono.framework/Commands/mono </MonoPrefix>
    <MonoPrefix Condition=" '$(MonoPrefix)' == '' And '$(OS)' != 'Windows_NT' ">mono </MonoPrefix>

EDIT: The less annoying way to deal with this is by running the following two commands.  They will add a symlink to the new mono / xbuild location that is both a) writeable on El Capitan and b) locatable in the Xamarin Studio search path

ln -s /usr/local/bin/mono /Applications/Xamarin\
ln -s /usr/local/bin/xbuild /Applications/Xamarin\

Hope this helps a few of you!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s