So - you made the big jump from Xamarin Studio over to Visual Studio for Mac when it was announced at //Build that it was production ready ... and you loaded up the solution you've been working on for the last couple of weeks ... hit cmd+Enter to run the iOS simulator... and the first thing that happened was ...

Build FAILED.

MTOUCH : error MT0008: You should provide one root assembly only, found 2 assemblies

Well - at least that's what happened to me!

I was so excited to use VSforMac ... and then BLAM-O!!! No dice... this is what I get for trying out anything new-ish... may as well go back to using Xamarin Studio!

What went wrong

The issue has 2 parts to it...

  1. The project has a reference to the Realm mobile database
  2. The path to the project has a space in one of the folder names.

It was the second part that threw me for a loop - as when I tried to recreate the issue with a brand new project and added Realm to it - it always compiled.

And I'll be honest, I didn't have much luck tracking the issue down until I pinged Realm on Twitter and they replied ...

Ach! Such an easy fix!

A Permanent Fix Is On the Way!

The Xamarin team is on it though!

Another person was experiencing the same issue, placed the question on the Visual Studio Developer Community & Xamarin was quick to the reply.

You can track the status of the permanent fix on Bugzilla here.

Moral of the Story

If you're getting an MTOUCH 0008 error in the new Visual Studio for Mac - check to see if you have any spaces in the solution path ... that might be the reason.

Also - be careful when you ask for help on Twitter ... when the answer comes & it's an easy solution ... you may catch some grief!

And I will never put spaces in folder names again!