I'm trying to run one of samples from this site.
The problem is: projects were made for Windows 8. When I open solution in Visual Studio, it tells me that I need to install Windows 8 SDK to proceed.
I'm using now Windows 10 SDK and I will no longer use SDK 8, so I'd rather not install this SDK and use new one intead. Can I somehow port this project to Windows 10 app?
How it looks like right now:
Yes, porting is possible. I would suggest creating a new project in this solution (most solutions of this git already added UWP support, as I saw) and redo most stuff. On some projects which use platform specific code, this porting might not work since some APIs changed from WP8 to UWP - as you probably know.
After this procedure I still had problems - I had no working .appxmanifest file, so I cannot create a .pfx file. This keeps warning you the certifcate file is missing.
I am not sure if all steps are necessary. I leave this as homework ;)
Anyway, here I show you steps to port the TodoREST-project to UWP:
Add a project.json
file to WinPhone81 project and put in following content:
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Xamarin.Forms": "2.0.0.6482"
},
"frameworks": {
"uap10.0": { }
},
"runtimes": {
"win10-arm": { },
"win10-arm-aot": { },
"win10-x86": { },
"win10-x86-aot": { },
"win10-x64": { },
"win10-x64-aot": { }
}
}
Save everything and close WinPhone81 project
In file explorer go to folder and edit Package.appxmanifest
Exchange Package Tag by following:
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:m3="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="m3 mp">
Remove ... and add following instead:
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0"/>
</Dependencies>
Edit TodoREST.WinPhone81.csproj:
In first <PropertyGroup>
replace <TargetPlatformVersion>
by this:
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
Change ProjectTypeGuids
to
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
On every PropertyGroup
with Condition=...
replace WINDOWS_PHONE_APP
in DefineConstants by WINDOWS_UAP
<forms:WindowsPhonePage
to <forms:WindowsPage
and forms namespace to using:Xamarin.Forms.Platform.UWP
(from .WinRT
)I hope this answers your questions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With