Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 2820 [details]
Screenshot of reference errors in monodevelop on OSX
When choosing 'edit references' in Monodevelop for a PCL, no options are listed in the 'Packages' tab, and the references are all marked in red with the tip:
'Assembly not available for .NETPortable 4.0 Profile1 Profile (in Mono 2.10.9)'
I'm forced to manually edit the .proj file and add additional references there.
This is a terrible user experience and gives the impression that PCLs are completely broken, when though they actually are not.
Screenshot of this not working attached.
Mono develop version information is as follows:
Installation UUID: 4e64d821-ca1e-400a-9895-cc911737e3f7
Mono 2.10.9 (tarball)
Package version: 210090011
Apple Developer Tools:
Xcode 3.2.2 (1650)
Mono for Android: 4.2.6
Android SDK: /Users/douglasl/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
Java SDK: /usr
Release ID: 30004007
Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
Build date: 2012-09-17 14:09:17+0000
Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Mac OS X 10.6.8
Darwin per-ms025.win2k.iinet.net.au 10.8.0 Darwin Kernel Version 10.8.0
Tue Jun 7 16:32:41 PDT 2011
The problem is that PCL libraries aren't available on MacOS X, they are only available on Windows (because Mono doesn't yet generate PCL assemblies).
The way PCL works on MacOS X is that we link with the MonoTouch or MonoDroid assemblies and pretend that they are the same as the PCL libraries (they aren't, but it's good enough in that it works for the intended purpose of building MonoTouch and MonoDroid apps)
I think the only way to fix this will be to figure out how to generate all of the PCL assembly profiles and bundle them with Mono.
Is this fixed by https://bugzilla.xamarin.com/show_bug.cgi?id=7173
Unfortunately, no. That fix just makes it possible to build against profiles other than Profile1 but doesn't fix the "assembly not available" bug that this bug report is about.
Thanks for the explanation.
Given the update, couldn't we you use the same type of 'interim solution' to get PCLs working against MonoMac/Xam.Mac too?
i.e. can't PCLs build against the Mono framework for MonoMac in the same way they build against the droid and touch assemblies for those platforms?
I appreciate this is not ideal - but it is an interim solution which works really well for monotouch.
Sorry if I've misunderstood anything - only just did my first MonoMac stuff this last weekend.
We do, actually. Things should build fine but editing the references is going to complain about missing references because the references don't actually exist (which is what this bug is about).
ah... ok... think I totally got the wrong end of the stick... but then I couldn't get any PCLs to work on MonoMac/Xam.Mac...
Ignore me! I'll try again next year :) Just trying to rush things. Sorry!
Oh, if it's not building for you on MonoMac/Xamarin.Mac - then that's a bug (but separate from this one).
If you file a bug, I'll try to make that a priority when I get back from vacation.
Let me do a clean install and build before I log anything (I was seeing all sorts of weird things but I was also confusing myself between M.M and X.M - http://forums.xamarin.com/discussion/599/portable-class-libraries-supported)
Next year :)
Over and out. (And sorry to Douglas for messing up this bug report)
Thanks Jeff - I've moved the PCL issues on Mac to https://bugzilla.xamarin.com/show_bug.cgi?id=9163
Any news on this or https://bugzilla.xamarin.com/show_bug.cgi?id=9163 ?
Do I stand any chance of getting 9163 looked at? I've got a pull request coming in for MvvmCross mac support that duplicates far too many .csproj files. So far I've just told them to hold fire based on the 'make it a priority' comment - but i'm guessing someone else has found a fair few other priorities for you :)
Looking at the diff, is there any hack I can put in to the csproj so I can get PCLs working in 3.1.1?
I couldn't seem to get any profile working before, but if there's a magic conditional csproj hack I can add then it will mean I can merge https://github.com/slodge/MvvmCross/pull/126 and then Kevin and others can get on with xam.mac projects :)
I'm not sure what part is failing, but it'll probably be a simple fix to make it "work", at least.
Michael Hutchinson just patched this code a bit after running into an NRE (perhaps this NRE is causing the failure you are seeing?)
See bug #9807 for his NRE & patch
I'll be looking into bug #9163 today and stepping through it to try and see where exactly things are failing. If I figure it out and patch it, I'll try and see if I can squeeze it into 4.0 (but I doubt it'll make it, I think QA got a "release build" yesterday).
If I can, I'll cherry-pick to 3.1.1 and roll a new dmg
Please don't rush out a patch for this. Do what makes sense for you guys to release/support it as part of the normal flow.
Besides, I'm not likely to get a window to look at Mac again until next week now at earliest - too busy for my own good :)
This works OK on iOS currently.... and maybe for .Mac projects (although there are other issues there)
But the Android project experience sucks - see https://www.youtube.com/watch?v=DUzoGJc9yys
We shipped PCL support on Mac last year.