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.
When I create or load a PCL, it seems that it does not find mscorlib.dll and errors with the following:
Error CS0518: The predefined type `System.Object' is not defined or imported (CS0518)
And all other primitive types are missing with simular errors.
create, a new portable class library and try building it.
Add reference to mscorlib.dll in PCL project (normatlly found in /Library/Frameworks/Mono.Framework/Libraries/mono/v4.5/mscorlib.dll).
This alpha build did not include the PCL Reference Assemblies which are required to build any PCL projects. There will be a new alpha available shortly.
I've run into this same issue. I had been building fine, but now a portable library I created a while back will no longer compile without errors like Mike listed. I tried his suggestion of referencing another mscorlib.dll, but I am just ending up with other build errors now in projects that reference the portable library project (ex: System.Uri is defined in an assembly that is not referenced).
I'm not sure what happened, but it broke me from building. I think I'm going to just get rid of the portable library and try to go from there.
Xamarin do seem to have fixed this issue with the latest alpha build, if you have that build, you can easily sort out the issue. If you create an portable class library from scratch, and build it you should still see the same errors, however, if you then go to the project options (right click on the project in solution explorer and then select 'options') and tick the boxes of the Frameworks you want to support, it should then build just fine for you.
Otherwise, you can still do my temp fix, you just need to select the system.dll system.core.dll and any other dependancies needed to build the PCL, you can find all the system dlls in /Library/Frameworks/Mono.Framework/Libraries/mono/v4.5/
Hope that helps.