Search code examples
androidxamarinjson.netxamarin.androidxamarin-studio

Could not load assembly 'Newtonsoft.Json' when running XamarinStore.Droid


I am trying to run the Xamarin Studio Sample app XamarinStore for Android.

Though, when I try to run the app, I get the following build error message:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(675,2): monodroid error XA0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. 
Reason: System.IO.FileNotFoundException: Could not load assembly 'Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=null'. 
Perhaps it doesn't exist in the Mono for Android profile?

I already have Json.NET framework on my Components folder. And I also have Newtonsoft.Json reference in my References folder.

What could possibly be wrong with my installation/configuration?


Solution

  • It turns out that my Newtonsoft.JSon reference folder was not being found, nor was my SDK folder, due to having a Windows username with special characters (João).

    I copied my Android SDK to a folder with no Special characters and changed the SDK location in Tools -> Options and I managed to get it working.

    This issue was reported in https://bugzilla.xamarin.com/show_bug.cgi?id=27074 and it is not resolved yet.