Bug 13463 - PCL projects do not compile after upgrading Mono to 3.2.0
Summary: PCL projects do not compile after upgrading Mono to 3.2.0
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: Macintosh Mac OS
: Highest blocker
Target Milestone: ---
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2013-07-25 05:01 UTC by Prashant Cholachagudda
Modified: 2013-07-26 18:29 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 GitHub or Developer Community 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.

Related Links:
Status:
RESOLVED FIXED

Description Prashant Cholachagudda 2013-07-25 05:01:29 UTC
After installing latest updates (Xamarin.iOS 6.4.0.0) on Mac, PCL library projects fail to compile with errors.

error CS0518: The predefined type `System.Object' is not defined or imported
error CS0518: The predefined type `System.ValueType' is not defined or imported
error CS0518: The predefined type `System.Attribute' is not defined or imported
error CS0518: The predefined type `System.Int32' is not defined or imported
error CS0518: The predefined type `System.UInt32' is not defined or imported
error CS0518: The predefined type `System.Int64' is not defined or imported
...
31 similar erros.

Waring:
/Library/Frameworks/Mono.framework/Versions/3.2.0/lib/mono/4.0/Microsoft.Common.targets: Warning: Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.0,Profile=Profile3'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior. (TestLib)
Comment 4 Jeffrey Stedfast 2013-07-25 15:28:44 UTC
fixed in Mono git master, will be in a Mono 3.2.1 release
Comment 5 Jeffrey Stedfast 2013-07-25 16:21:44 UTC
fix reverted. going to have Martin add PCL fallbacks for users without the real PCL assemblies installed, instead.
Comment 6 Jeffrey Stedfast 2013-07-25 16:25:22 UTC
Martin: If the user doesn't have the real PCL assemblies installed, then the Microsoft.Portable.CSharp.targets files need to fall back to the old behavior of linking against the Xamarin.iOS/Android assemblies.
Comment 7 Mikayla Hutchinson [MSFT] 2013-07-25 16:27:27 UTC
Since we may not have all PCL profile, it's not just a question of whether we have some PCL profiles installed but of whether we have the *specific* PCL profile installed.

I would suggest we do something like:

<_HasRealPclProfile>False</_HasRealPclProfile>
<_HasRealPclProfile Condition="Exists('mscorlib in real
profile'">True</_HasRealPclProfile>

Then add conditions on the "real" targets and the fallbacks using this value.
Comment 9 PJ 2013-07-26 11:30:01 UTC
Alan pushed the fix from Jeff to the release branch. 

If we can't get a response from Martin by the time that's built and testable, we should consider shipping anyways to fix all the people who used to have PCL support working.
Comment 11 Allie Miller 2013-07-26 17:27:27 UTC
Issue also appearing in Case #42105