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.
Created attachment 5461 [details]
version info from Windows PC
I recently wiped my development machine of all traces of Xamarin and Visual Studio 2012. Then I re-installed Visual Studio and the latest stable build of the Xamarin tools.
I tried to create a Portable Class Library that targeted the .NET Framework 4.5, Windows Phone 8, Xamarin.Android, and Xamarin.iOS. However, the Change Target Frameworks dialog in Visual Studio wouldn't allow this combination, complaining that "There is no available functionality that is portable between the frameworks you have selected". This confused me, as this combination should be allowed.
After investigating, I discovered that the installer had created the "Xamarin.Android.xml" and "Xamarin.iOS.xml" files in the "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile7\SupportedFrameworks" folder, but failed to copy these files to the sibling Profile49 and Profile78 folders.
I copied these files manually (requiring Administrator approval) from the Profile7 folder to the other profile folders and restart Visual Studio. Afterward, the Change Target Frameworks dialog worked as expected. This explains why "Xamarin.Android" and "Xamarin.iOS" was listed in the Change Target Frameworks dialog, but wouldn't work when combined with Windows Phone 8.
I have attached my full version information for your reference.
I tried to reproduce your issue with next steps:
1) Uninstall Xamarin iOS/Android & Visual Studio 2012
2) Install Visual Studio 2012, Xamarin.iOS 1.8.365 & Xamarin.Android 4.10.01073
3) Create PCL library with .NET Framework
4.5, Windows Phone 8, Xamarin.Android, and Xamarin.iOS targeting successfully.
Complaining did not appeared. Also Xamarin.Android.xml and Xamarin.iOS.xml were installed in Profile7, Profile49, Profile78 folders.
The profiles should be installed correctly if you have the Xamarin.iOS 1.8.365 & Xamarin.Android 4.10.01073
It looks like Brian does have 1.8.365 and 184.108.40.206 installed from the attached version info.
There is a flag during the installation that checks for the Windows Phone 8 SDK, and if it's there it will install into 49 and 78, but if it's not it won't.
It looks like you have the Windows Phone 8 SDK installed now, but is it possible you didn't have it installed when you installed the latest versions of Xamarin?
I'm going to set this to NEEDINFO so we can get a follow-up from Brian.
It is possible that I installed Visual Studio, then Xamarin, and then Windows Phone 8. I am not certain.
If that is what caused the problem, then I think it would be very helpful if Xamarin at least detected that target frameworks were installed since the last time it ran and preferably offered some information on how to update things.
The way it works now, it is not at all obvious what the problem is. The only reason I was able to figure it out is that I had previously done some hacking to get PCLs working, so I had an idea of what the Frameworks folders and files should look like.
What is the recommended procedure if a target framework is added after Xamarin is installed? Should Xamarin be installed again? Does it need to be uninstalled and then reinstalled? Can we get this procedure documented?
The PCL component is installed as a separate "feature" of the .msi installer. The idea was that people should be able to run "Update" or "Repair" (Control Panel / Software / right-click on the name) on it after installing new target frameworks.
However, during those busy days that lead up towards the PCL release, it's possible that this never got fully tested. It is supposed to be there, but I must admit that I'm not sure whether the code has actually been written for it. I'll have a look.
Closing ancient bugs, please reopen if you're still having this problem.