Alrighty, a great task has befallen upon me. It’s time to upgrade our W8.1 enterprise app to run nativly on W10!
We’ll see how many steps we’ll need for this as we go along the migration. But here’s step 1!
Setup
1. I’ve just upgraded my work pc to W10 with a fresh install of Visual Studio 2015 Enterprise. (I’ve also installed the W8.1 SDK).
2. I created a separate branch for this conversion, as a colleague will still be working on the W8.1-project while I do the conversion. (he won’t be adding any new features, mainly some bugfixing; hopefully, we won’t have much trouble with merging these things afterwards. Fingers crossed!)
Project migration
Microsoft has the following document that describes how to convert the solution and its projects to the UWP.
It’s my first time trying this, let’s see how it goes…
In addition to the given steps, I’ve also moved the entire Shared codebase (from the W8.1-shared project) to the UWP. I won’t be needing the phone project anymore (it was empty anyways), so I just deleted it.
(Ugh; after re-adding each nuget package, VS decides to freezes over for a little bit. Quite annoying!)
After these steps, I’ve referenced all required nuget packages and pressed build. 4700+ errors to go. Seems like some packages have bigger updates than others 🙂
Trying to convert our PCL’s to use W10 instead of W8.1 didn’t quite work. For some reason, VS always changes W10 to W8.1 again… I’ve decided to remove these projects and recreate them as a new Universal Windows Class Library.
A good tip from a colleague: Create your new project, edit the project file and copy all ItemGroups to the new project. VS2015 seems to not like dragging a group of files and folders into its projects. It only added the root-level objects/folders and ignored any childs. But if you look with “Show all files”, all the things are there!
Copying the ItemGroups is also very usefull when working with linked files. As these don’t exist on the same path in the filesystem, you can’t copy them from there.
3. Now onto the errors.
Most of these are namespace issues and are easy to fix.
I’m having some (bigger) errors after updating prism to its W10 version. But that wasn’t a surprise, we’ve made quite some changes and hooks into prim their navigation service to do some work for us. So we’ll have to look into this in more details tomorrow.
To be continued!