Bug 21643 - Unable to target Profile 111
Summary: Unable to target Profile 111
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-28 13:41 UTC by Jacob Ebey
Modified: 2015-05-26 12:28 UTC (History)
7 users (show)

Tags: ac pcl
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 Jacob Ebey 2014-07-28 13:41:47 UTC
The goal is not to be able to add Windows Phone 8.1 as a target but rather to make DllImportAttribute available and be able to target Windows Phone at the same time.

DllImport is not supported on Windows Phone 8.0. This means that including Windows Phone 8.0 anywhere will restrict our .NET subset to one that does not contain DllImport.

As of right now profile 111 is not supported as a compatible configuration. If you want to target WP it makes you target WP 8.0. If you try to add WP 8.1 and drop WP 8.0 to an assembly that references Xamarin.Forms, you get a nasty error like this:

"Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled. Visit http://docs.nuget.org/docs/workflows/reinstalling-packages for more information."

Frankly I'm surprised that there seems to be no uproar about this because it essentially means you can't P/Invoke with Xamarin Forms unless you drop Windows Phone altogether. What's especially surprising about it all is that profile 111 contains a broader subset than 259... so it's literally the flip of a switch your end.
Comment 1 Jason Smith [MSFT] 2014-07-28 13:52:25 UTC
I'll be honest, we hadn't flipped the switch because we were afraid that people would assume marking the nuget package as working on WinPhone 8.1 projects would cause people to assume we supported it.

Obviously the core lib profile is 259 (as you discovered) because we do intend to support RT. We can modify the packages, we just need to find a way to clearly message that the backend requires the 8.0 profile still.
Comment 2 philip 2015-02-13 14:32:31 UTC
Any update on this?
Comment 3 Jacob Ebey 2015-02-20 18:16:00 UTC
We recently bought a few licenses to move forward with our projects and much to our dismay we still cannot reference our core libraries within a Xamarin Forms project. We develop our codebase targeting Profile 111 and this is a requirement for us.

We are hoping you can provide a configuration that removes Windows Phone Silverlight as a target.
Comment 4 Daniel Toone 2015-05-12 16:41:35 UTC
I would also like to cross reference this bug, submitted by me today:

https://bugzilla.xamarin.com/show_bug.cgi?id=29999
Comment 5 Jacob Ebey 2015-05-12 16:46:42 UTC
Jason Smith, may I recommend just throwing a NotSupportedException if Xamarin.Forms is initialized from a WinPhone 8.1 project with a descriptive message?

Problem solved...
Comment 6 Rui Marinho 2015-05-26 12:28:17 UTC
Should be fixed with 1.4.2