Reputation: 911
If I set up a Xamarin.Forms Solution in VS 2013 and try to run the iOS Version, it fails because of the following error:
Error 2 Can not resolve reference: /Users/Koray/Library/Caches/Xamarin/mtbs/builds/WalkiOS/aae389efbebffd5cd3625dcf99aad02c/C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0/Facades/System.Collections.Concurrent.dll Walk.iOS
The Xamarin Build Host for Visual Studio is set up and a few weeks ago it worked fine. I can't find anything to fix the error.
Upvotes: 13
Views: 6246
Reputation: 1005
Both the above for me have occurred in the past in different situations for sure. The latest problem occurred because I had residual bin and obj directories with libraries built under a different shared project in the solution. I have been switching back and forth between a Xamarin.ios and Microsoft.ios project. I used a tip from a different article to clear all the bin and obj folders:
find . -iname "bin" -o -iname "obj" | xargs rm -rf
How to delete the bin and obj folders
Upvotes: 0
Reputation: 2263
This can happen if you include a library that's not part of Xamarin.iOS. For example, when you Alt-Enter with ReSharper and it auto-adds a reference it thinks will work, when actually, there's no iOS equivalent of it. This happened to me when I had ReSharper add System.Web. The error looked like System.EnterpriseServices.Wrapper, but the actual error was a non-Mono/non-iOS library being referenced by my project. Unfortunately, the error message is effectively wrong. I hope that helps!
Ybrin's answer is also true. I came across this SO article looking for a different answer, and ended up figuring out this alternative answer.
Upvotes: 1
Reputation: 911
The solution is to update Xamarin on both machines to the same version. It should work fine if you do this.
Upvotes: 17