Bug 7173 - Allow linking to PCL libraries in any profile
Summary: Allow linking to PCL libraries in any profile
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-09-14 06:22 UTC by Stuart Lodge
Modified: 2014-04-15 16:02 UTC (History)
5 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 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.

Related Links:
Status:
RESOLVED FIXED

Description Stuart Lodge 2012-09-14 06:22:37 UTC
Currently if I try to link any Portable Library which is not "Profile1" to a MonoTouch library or appication project, then I get the warning reported within the UI that the PCL is incompatible - e.g.:

- "Incompatible Target Framework (.NETPortable 4.0 Profile4 Profile)"

or (in my case):

- "Incompatible Target Framework (.NETPortable 4.0 Profile104 Profile)"

At build time this then results in the MonoTouch project refusing to build - it simply doesn't pull in the namespaces from the portable class library project.

I've tried tweaking the MonoDevelop source, but am having problems building/testing on the Mac (I'm trying!). I think the problem is to do with:  https://github.com/mono/monodevelop/blob/master/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs

If you need some sample Profile104 projects then see the vnext branch of https://github.com/slodge/MvvmCross/ but note that you also need this patch (http://slodge.blogspot.co.uk/2012/09/a-helper-on-getting-monotouch-building.html)

Is there any way I can get the additional profiles (especially Profile104) supported?

Thanks 

Stuart

Note: I don't need "proper PCL support" - I just need MonoDevelop and MonoTouch to try to build the relevant projects against MonoTouch.
Comment 1 Alan McGovern 2012-10-10 07:56:09 UTC
There's no reason I can think of to prevent other profiles from being built since our current support is basically a giant hack. Should we just remove the build time restriction to Profile1 projects so this scenario is supported too?
Comment 2 Stuart Lodge 2012-10-27 03:04:24 UTC
Please do :)
Comment 3 Stuart Lodge 2012-10-27 03:05:56 UTC
Also, is there any way this can be done within a hack - i.e. is there any way I can just edit some .targets or other files within an installation to make it work?

Thanks

Stuart
Comment 4 Mikayla Hutchinson [MSFT] 2012-10-29 15:43:23 UTC
You can reference the compiled dll directly, instead of using a project reference.
Comment 5 Stuart Lodge 2012-10-29 16:17:02 UTC
Thanks Michael

But I use automated refactoring a lot - so I really want to use proper project linking.

I'm now supporting this using the cool Conditional Build file tweak suggested by JonPepper - see http://slodge.blogspot.co.uk/2012/10/a-temporary-solution-for-profile1-only.html

Stuart

P.S. I am trying to log these PCLs error to help make MT and MD better - I'm not just trying to be a pain - honest!
Comment 6 Jeffrey Stedfast 2012-11-15 16:06:25 UTC
fixed in git master
Comment 7 Wade Colson 2014-04-15 16:02:30 UTC
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/random-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.