In a project that's targeting Windows Phone 8.0, is there a way to conditionally use WP8.1 features while retaining compatibility with 8.0?
No you can not. If you need wp 8.1 features you need to target wp 8.1. According to adduplex 77.8% of windows phones are using wp 8.1 with 8.9 using wp8.
The only option to do this is to create a project that has a portable class library, wp8 and wp8.1 project in it. Put as much of code in the portable class library as possible. Publish both versions of the app. I would use something like MVVMLight for this
Related
I have a quite big project developed in UWP, and I'm thinking of migrate to Uno Platform with Android, iOS and MacOS users in mind. The biggest and most important part of the project is a MapControl, but I don't know if when migrating the project, in Android, and other OS, the app will continue using BingMaps (with all the tools and things that brings) or will use OS default map provider and engine.
Will be possible to achieve something like that with Uno on other OS that is not Windows?
Direct support for Uno to use the UWP map control isn't available yet, but there are Native Android and iOS versions of the Bing maps SDK available which may be able to be called from Uno.
Here's the SDK getting started page: https://www.microsoft.com/en-us/maps/mobile
I created a new UWP app and wanted to load an XML file using the xelement class.
While looking on mdsn, I see I can do this using the load(string) method
https://msdn.microsoft.com/en-us/library/system.xml.linq.xelement(v=vs.110).aspx
In my UWP project the xelement is missing the Load method.
Why is this happening ?
Is it because I am not actually using the .NET while building UWP apps ? Or I am using a subset of .NET while building UWP apps ?
While looking on msdn how can I verify if a method from a .NET class is also available while developing a UWP app ?
Is it because I am not actually using the .NET while building UWP apps ? Or I am using a subset of .NET while building UWP apps ?
The .Net APIs that can be used in UWP apps is called .NET for UWP apps. .NET for UWP apps provides a set of managed types that you can use to create Universal Windows Platform apps for Windows 10 using C# or Visual Basic. Note that .NET for UWP apps includes a subset of the types provided in the full .NET Framework for each namespace.
While looking on msdn how can I verify if a method from a .NET class is also available while developing a UWP app ?
As #Paweł Hemperek said, usually, we can find if a .NET Framework class is available in UWP apps by checking the Version Information in the bottom of the document. If we can find Universal Windows Platform under Version Information then we should be able to use this class in UWP apps.
But please note that one class can be used in UWP not means that all of its properties and methods are available in UWP. For example, XmlElement Class is available in UWP, but XmlNode.SelectSingleNode Method (String) can't be used in UWP apps.
I heard we can create package for WP8.1 from UWP project if you haven't used any UWP specific codes? Just wanted to check how can we do that?
Nope, you can't create WP8.1 package from a UWP project. UWP apps have dependencies on Windows 10 Runtimes and compilation targets one or another version of Windows and corresponding SDKs.
What you can do is to use shared code between two projects. E.g. you can create a portable class library that will target both Windows Universal (10) and Windows Phone 8.1. There is also a detailed article by Lance McCarthy on how to use the same XAML for both UWP and WP8.1.
My PCL project is setup with these targets:
.NET Framework 4
Silverlight 5
Windows 8
Windows Phone 8.1
Windows Phone Silverlight 8
I created the PCL target for my nuspec file using the NuGet Package Explorer.
My target looks like this: lib\portable-net4+sl5+wp8+win8.
If I create a Windows 8 test project, I can find the latest version of my library in NuGet. If I create a Windows Phone 8.1 project, this version does not show up.
What am I doing wrong here?
According to NuGet documentation (please take a look here at "Common Framework and Profile Targeting Examples" section) you need to add wpa to your target to make it work. Please be also aware that wpa target works only with NuGet 2.8.1+
Those same profile targets are what is used for the items in the portable profile target.
I tried to convert my parse app into "universal app". I upgraded my project into Windows Phone 8.1 and I cannot install Parse SDK anymore. NuGet tells me:
Could not install package 'Parse 1.2.14'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Did anyone managed to install Parse for a project targeting Windows Phone 8.1?
BTW It worked for Windows 8.1 project.
The nuget package hasn't been updated to work with the Universal apps. You can download the .NET SDK from their website directly however and get the Universal app support. The SDK contains a Parse.dll, ParseWindows.dll and ParsePhone.dll.
You can place the Parse.dll and ParsePhone.dll in to your Windows Phone 8.1 Universal references and it should work.