Hey? Landing here in 2016 following a Windows Developer Tweet? There is a later post;
Following on from this series of posts, it’s been a little while since I had a chance to continue rebuilding my QR code scanning app;
I thought it was about time that I started to think about making this application ‘universal’ in the sense of seeing what it was like to run it on a phone.
I knew that it was going to be ugly as I’d given phone no thought up until now but I flipped the switch and hit a couple of things straight away.
The first problem was that it seemed like I hadn’t built this code for ARM before or, if I had, I’d made significant changes since then because I’m using some /unsafe C# code and so I had to tweak my project settings as it looked like I hadn’t enabled /unsafe for the ARM builds.
That was easy enough to fix.
The second problem I got was much more of a head scratcher. This app (and project) originated on Windows 8.0 and then moved to 8.1 and then I migrated it to 10.0 in that first blog post.
When I tried to deploy the app to the phone (emulator or real device) I would find that I would get an error;
Severity Code Description Project File Line
Error Error : DEP0001 : Unexpected Error: Package could not be registered. (Exception from HRESULT: 0x80073CF6)
and I hadn’t a clue what to do with that one.
In the end, I resorted to the age-old trick of making a new, blank project and comparing the contents of the app manifest file in that project with the one in my project.
Sure enough, after a few experiments I realised that it was the PhoneProductId which was causing me a problem here. Mine was;
and that seemed to block the deployment.
I don’t remember exactly where this PhoneProductId came from – maybe I put it in there myself at some point but I found that replacing it with a random GUID seemed to fix the problem. Naturally, I need to come back and figure out exactly what value it should have in my scenario but, for now, I can run on the phone and so, hopefully, if you see the same problem at some point in the future you might land on this post and it might save you some wasted hours.
With the application now running on the phone – what was it looking like? In short, awful
and the image capture screen is there too;
and it seems to mostly function but it looks like I need to do some work either to adapt or tailor this UI and that’s going to be the next decision to make…