简体   繁体   中英

Specify Windows Phone targets in Xamarin.Forms

It seems, the Xamarin.Support forums are pretty dead, so I will try my luck reposting the question here, on StackOverflow (original: http://forums.xamarin.com/discussion/58083/specify-windows-phone-targets#latest ).

I have a problem creating new Xamarin.Forms project.

Until the last update, when creating a new Xamarin.Forms project (Blank App Xamarin.Forms Portable), I got the core project, Android, iOS, Win81, WinPhone81 and UWP (which is exactly what I desired). However, since yesterday I keep getting core, Android, iOS and Windows 8.0 Silverlight projects.

I tried to remove the Silverlight project manually and add reference to Windows8.1 and UWP projects. However, I was not able to change the targets of the PCL (the Core project) - it forced me to keep the support for Silverlight. (Actually, I was able to change the PCL targets after removing all Xamarin.Forms dependencies and then re-referencing them).

What happend? How do I specify the targets for the Windows platform?

I am using Xamarin for Visual Studio. Current Xamarin.VisualStudio version is 4.0. I was trying to create the new projects with both .NET 4.5 and 4.6 framework settings.

PS: Not directly related to this question, but I am getting some weird JSON error (after re-targeting, an empty project.json file was created in the PCL library). However, upon building the project, the application runs smoothly both on Android and Windows Phone (haven't tried it on iPhone, yet).

You have to manually add UWP project. Check out this page and in particular this one

I'm on latest, Xamarin 4, in the Stable channel. Using VS 2015 on Win10 with UWP tools installed (this is an important option). Just created a project now and got a prompt about which version of Win I wanted to use, 10.0 being my default option.

When the prompt was up I only had an 8.1 project in the solution.

After the prompt an UWP project was created.

Does this differ from your experience?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM