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 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.
I created a new iOS project, added a portable library project to the solution and tried to add a reference to it from the iOS project.
Microsoft Visual Studio
Unable to add a reference to project 'Newtonsoft.Json.Portable'. The current project does not support references to Portable Library projects.
Just FYI, MFA has the same issue.
This is the explanation of Michael Hutchinson about PCL compatibility:
<<PCL is a fairly well understood problem, the problem is there are lots
of little details we'd need to fix up to make it fully supported. As
well as installing XML files into the SupportedFrameworks directories
of each PCL profile to mark them as compatible with MT/MfA, we need to
audit the MT/MfA classlibs for all of the type forwarding attributes
to make them PCL compatible. At this point it would work on Windows
for both VS2010, VS 2012, and MD 3.0.7+ (yes, MD supports PCL, Jeff's
been working on that on and off with some pointers from me and it's
pretty complete). >>
Right now, PCL is not 100% supported. We may deploy XML file inside SupportedFrameworks and it will be partially supported (see ... http://www.screencast.com/t/PqmVJ2oPm) but we have to make some modifications in class libs as Michael points out.
*** Bug 10345 has been marked as a duplicate of this bug. ***
Will be ready when we land PCL.
A user has recently reported that this does not work in VS2012, Xamarin.iOS 1.3.250.
## Steps to reproduce
1. Open attached PCL Reference Test solution.
2. Edit references for "PCLProjectReferenceTest", and try to add a reference to "PortableClassLibrary".
"Unable to add a reference to project 'PortableClassLibrary'. The current project does not support references to Portable Library projects."
But adding a reference to "PortableClassLibrary" works on the Mac using Xamarin Studio, and if you add the reference to the PCL project on the Mac and then copy the solution back to the PC, Visual Studio will successfully build, deploy, and debug it (with build warnings about not supporting references to PCL projects).
Created attachment 4553 [details]
PCL Reference Test
Is there any news ? I have updated with xamarin.android 4.8.3 and existing solution under VS is now showing the "PCL not supported" warning in android project.
This was working with preceding xamarin.droid version...
Is there a fix ?
+1 same problem with both 4.8.3 and 4.10.0, on VS2012 and VS2013.
@Olivier and @softlion:
This problem arises when Visual Studio cannot confirm that Xamarin projects support PCL profiles. Visual Studio uses XML files to determine this compatibility. To resolve this, you can add appropriate XML files following Stuart Lodge's examples  to the various "SupportedFrameworks" folders. For example, for Profile104, you would copy the XML files into:
> C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile104\SupportedFrameworks
Once full Xamarin PCL support is released, these XML files will be added to the appropriate SupportedFrameworks folders automatically during Xamarin installation.
See also Bug #10345
Ah, never mind about Bug #10345. It's a private Xamarin bug, but not to worry. It just contains another brief wording of the same explanation.
@brendan: doing this breaks nugets which then disallow adding any portable nuget package to any pcl projet.
This is worst than the problem.
That's ok, I knew this XML trick in profile 104, I already had this file (one for monodroid and one for monotouch, so 2 files in reality)... It is just that the XML files has been suppressed. I finally found that my XML file disappeared and this was causing the problem.
XML suppression occurred after I updated Xamarin.
But as I also installed VS2013 around the same day, this can be a VS problem not a Xamarin one.
You will notice that in this case installing VS2013 can suppress profiles used by VS2012. Must be confirmed. At least one of this update is the culprit...
Well, now my VS2012 is ok and I can open Xamarin projects. But I can't no more work with cross-platforms projects including for example Android and WinRT : Android/Xamarin is working only in VS2012 and with Windows 8.1 WinRT apps can only be done using VS 2013 !
I know Xamarin is working on VS2013 integration, I just hope this is a high priority task for the team because for cross-plateform it is a super big problem.
Thanks for your help.
Thanks for the extra information from you both! Very much appreciated.
The ideal solution for the NuGet problem is for NuGet to fix up its logic. See http://nuget.codeplex.com/workitem/2926, and particularly mhutch's comment. Xamarin would definitely like to have this working, so depending how things go on the NuGet side, there might be another prettier workaround in the future.
For the time being, one workaround would be to go back and remove the Xamarin SupportedFrameworks XML files, and then either:
1. Add a reference to the PCL project by hand-editing the .csproj MSBuild XML file. That is, add something like this to the app project:
> <ProjectReference Include="..\PortableClassLibrary1\PortableClassLibrary1.csproj">
2. Reference the compiled DLL from the PCL project instead of the project itself.
As far as I've seen, Visual Studio only complains about _adding_ the PCL project as a reference. Once the reference is included, VS still shows a warning icon, but it compiles the app project successfully anyway.