DatePicker not available in XAML in Windows Phone 8.1 project retargeted from 8.0

datepicker, windows-phone-8, windows-phone-8.1

Solution

You upgraded your project to a windows phone silverlight 8.1 app, not a windows phone windows runtime 8.1. The new DatePicker is only available for windows phone windows runtime 8.1. In a windows phone silverlight 8.1 app you will still need to use the DatePicker from the windows phone toolkit.

Problem

I've recently updated a Windows Phone 8 app to Windows Phone 8.1. I'm trying to add a `<DatePicker />` control (newly available in Windows Phone 8.1) to the XAML but it's not available in my XAML. I get the errors: The name "DatePicker" does not exist in the namespace "http://schemas.microsoft.com/client/2007" and The type 'DatePicker' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. and The tag 'DatePicker' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' However, if I create a new Windows Phone app the `DatePicker` is available there. Also, I can create and add the DatePicker via the codebehind, just not in XAML. I have checked and can confirm the project is targeting Windows Phone 8.1, and as far as I can see I am referencing the correct assembly: What do I need to do to make the DatePicker available in XAML?

Original source