You may be able to fix this by editing the file /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets, finding the PropertyGroup that setsAnd to it, adding the lines:
MonoTouch
smcs
/Developer/MonoTouch/usr/bin
Found this hint via http://stackoverflow.com/questions/12041290/monodevelop-is-it-possible-to-switch-pcls-compiler/12062589#12062589 and https://bugzilla.xamarin.com/show_bug.cgi?id=5329 - wish I'd found it months ago (note to self - don't give up so easy next time!)
For Mac newbies, note that this file is in the root from the hard disk (not from the user) and that you will need to edit file (and folder?) permissions in order to edit it - you can do this from finder using 'more info'.
That's great news Stuart :)
ReplyDeleteHi, do you have anything further on this? I get incompatible target framework when trying to use from a MT project... I'm using profile 104 and set up as described in your previous posts.
ReplyDeleteI got my first project loading and running this morning (2 hours ago).
ReplyDeleteSadly you do have to edit the PCL project files from Profile104 to Profile1, and I did have to change the way the plugins loaded (http://stackoverflow.com/questions/12401588/can-you-use-assembly-load-in-monotouch) but apart from that it works...
I'll ping the Xamarin guys to see if I can get the 104 thing fixed...
And I'll write some more code this weekend - after 4 months, it finally works :)
There was also a couple of problems building the Touch version of the System.Net forwarding libary - but fortunately they're fairly easy to workaround.
ReplyDeleteLogged to https://bugzilla.xamarin.com/show_bug.cgi?id=7173 - hopefully this is just a small issue and the team will be able to implement it quite quickly.
ReplyDeleteBrilliant, thanks! I'll dig in on Monday but that should at least get me going. From your bug report it looks like it should be trivial for them to support 104 too which is great news.
ReplyDeleteThank you for all your work on piecing this together, it's been a massive help. Really appreciate it. I'm finding the Xamarin products great so far but this one issue is the only real pain point.
Thanks Sean.
ReplyDeleteAre you using PCLs for MvvmCross or for your own libraries? If for MvvmCross, then I should warn you that that vNext branch is slightly out of date - there are a few recent fixes from the master branch that I haven't yet copied across.
Regardless, good luck with whatever you're doing - I know @dsplaisted and @davkean at Microsoft are both super keen to see more PCL projects out there :)
Stuart
Happy to report I have it working great so far on Profile1...
ReplyDeleteNot actually using MvvmCross on the current project as it's iPad only. I've had a good look at it though and it looks like a fine piece of work, I'm quite sure I'll be using it in the future! Keen to dig through the source at some point and understand how you've implemented the data binding bits :)
I'm using a PCL to share code between the MonoTouch project and an MVC4/Web API web project. Despite all the hacks piled on top of hacks to get it all functioning, the workflow is actually now quite seamless. My only want now would be to have async/await in MonoTouch but I've lived without it to this point in life, I can wait a little longer!
Cool. Jealous that you get to use Profile1 (every hack hurts a little!)
ReplyDeleteIf you fancy some more hacking then async/await might only be a compiler change away... http://fizzylogic.azurewebsites.net/2012/05/04/adding-asyncawait-support-to-your-mono-for-android-projects/