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.
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.
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.
Any update on this?
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.
I would also like to cross reference this bug, submitted by me today:
Jason Smith, may I recommend just throwing a NotSupportedException if Xamarin.Forms is initialized from a WinPhone 8.1 project with a descriptive message?
Should be fixed with 1.4.2