Last modified: 14 April 2017
Writing this up and then trying some more things led me to an answer. Here's how you can fix the VS2017 bug that won't let you create Store App Packages.
I write and maintain about a dozen modern Windows 10 apps. We make beer money on public store apps, like PhotoMaps, and real money on enterprise apps for clients and embedded devices, like our Mini Car Counter .
I like the C# programming language, I like the .NET library features, and I like self-contained IDEs like Visual Studio.
When it works, it’s a pleasure. Start a project, write code, press run, and it works on laptop, desktop, phone, raspberry Pi, and more. And as Visual Studio, the Windows Developer Centre, and the UWP platform has improved over the past three years it’s been working more and more often.
But I’m frustrated to say that the UWP process still isn’t good enough.
On Tuesday, Microsoft released its newest update to Windows 10: The Creator’s Update. It’s great, it brings a lot of bug fixes and some new features like 3D Paint and a better Share dialog.
It also replaces the old Nokia-written Maps with a new Microsoft-written Maps. There’s a lot to like in that update; 3D acceleration works better and there are a lot of new styling and projection features that I’m excited to use. But there are also some pretty nasty bugs and they broke PhotoMaps.
Now remember, this app makes me beer money. I think it’s a really good app, we sell a decent number of copies, and have over a thousand downloads with little promotion. We have positive reviews from all over the world giving an average of well over 4 stars. It’s the kind of app that Windows 10 needs more of.
But fixing these bugs and updating my app is torture. There is no way that I can justify the time that it will take as anything but a fan of the platform. And I know that the process for doing the same on Android, and maybe even iOS, would be much easier.
First of all I had to find and fix a bug in my code, caused by an improvement by Microsoft. In PhotoMaps I draw all of the user’s photos that are on the currently visible portion of the map. So I have a function called getBounds that tells me what bits of the map are visible.
The old map control returned a list of four points of a rectangle, so I could take the top-right and bottom-left point to create the rectangle that I'd search for photos in. Easy.
The new map control understands projections and spheres. So it returns a more complicated shape than a rectangle. Thankfully the new update also fixes a buggy method from earlier, GeoboundingBox.TryCompute, and we can use that.
A pretty simple bug. I identified, fixed it, and tested the fix within an hour.
The next bug was a two-hour bug. I tried a lot of things that didn’t work, like checking that I was properly submitting my Bing Maps key to use the MapControl.
Eventually I found that the MapLocationFinder.FindLocationsAsync method has changed a bit. If you ask for one result, it now gives you zero. If you ask for two results, it now gives you one. This feels like a bug to me, but not an unusual one. I can see how that slipped through testing.
Once I found the bug, I fixed the bug. No extra lines of code, I just changed a two to a one and the app worked like before.
So far, so good. Change is hard, bugs happen, three hours to fix problems in a small project is no problem at all. If I could have just pressed compile and submitted my update to the store I’d have been happy with how I spent those four hours.
But I couldn’t. A day and a half more frustration followed.
Let me give some background first. Creating Windows Store App packages has always been frustrating. Assets are hard to create, package builds fail for unknown and hard to fix reasons, the whole thing is a mess. But eventually, if you delete enough temporary files, restart your computer, and clean the solution enough you could get a build done.
Recently, Microsoft introduced .NET native. This means that instead of a 20s build time, it’s a 5 minute build (Core i7, 2.4Ghz, 8GB RAM, SSD) before you know that something’s wrong. That really slows down bug fixing. And it's bug fixing that shouldn’t be required. These are all problems in the Visual Studio 2017 build chain. In my opininon they're Microsoft's problems not mine.
So here’s the first problem I had, none of the localised languages in my app could complete the compile successfully. I tried a lot of fixes. I reinstalled the Multilingual App Toolkit (Microsoft’s suggested process for localising apps) — still the same. I started a new project and checked that I could compile multilingual apps from that — I could, so it’s a problem with my project. I tried manually updating all the translation files to the new version of Multilingual App Toolkit — still the same.
And remember, each step above requires about 10 builds (5 minutes each) with a new methodical test in between to try and track the problem. I gave it five hours before I gave up and crawled into bed.
The next morning I deleted the other languages. I’m desperate to get this update out because my biggest fans are already complaining that the Windows 10 Creator’s Update has broken an app that they love. I figured that most would be okay with a stable English version for a few weeks, I'll come back and fix the language problem later.
Yet more pain. Now some assets (app logos mostly) weren’t making it into the final store package.
So I tried recompiling my assets using the new tool for asset management in Visual Studio 2017, only to find that it doesn’t create all the assets you need by default.
So I found that, and fixed that, and by this point I was getting really excited…
But I still couldn’t create a Windows Store app package. And remember that every time I make a change, every time I try a new thing, I’m waiting 5 minutes for .NET native compile. It’s infuriating.
So now I’ve spent two full days upgrading my development machine to Creator’s Update, testing just one of my apps, finding two bugs that weren’t really my fault, fixing those bugs, and then trying to compile and submit my app.
And I can’t do it. I’m chasing bug after bug after bug trying to do something that’s never worked properly in three years of UWP development: compile a package for the Store.
I have already spent more billable time on just his one fix than the whole of my revenue from the app. No wonder the app selection on the Windows Store is poor!
Microsoft, this isn’t good enough.
I was listening to Windows Weekly earlier. Paul Thurrott had an interesting idea, maybe Microsoft should extend UWP to other platforms so that developers like me can take our existing apps and use the bigger audience to justify investing time and money in improving them. It’s a great idea.
But here’s the problem. The reason I’m not updating and improving my app, and the reason why the hundreds of other developers like me who could fill the Windows Store with great content aren’t doing the same, isn’t because of the small market. 500 million Windows 10 users on the Desktop around the world excites me. The fanbois still using Windows Phone excite me too. I know that with a great app, great marketing support from Microsoft, and a push on our side to localise and advertise better, we could make good money developing for Windows.
But if the basics don’t work, if Visual Studio can’t compile a Store package properly, and if Microsoft’s suggested Multilingual process breaks apps, then I can’t do that. If Microsoft can’t even get this right on Windows, after years of trying, what hope do they have of supporting this on Android?