David Ruttka

I make computers do things

Why Doesn't Cordova Run Windows Run the 8.1 App?

| Comments

A few years ago, I did a (very intro level) talk on PhoneGap. Recently, I’ve been getting back into Cordova for serious business — wow, have we come a long way =)

One of the things that caused me a bit of friction was that cordova run windows wasn’t working how I expected. It kept trying to run the 8.0 target of the universal app instead of the 8.1 target.

I was working around this by opening the .sln in Visual Studio and explicitly running the 8.1 project. I’d prefer not to do this.

Today I finally took a minute to search for a solution, and I found what I needed to do.

By default build command produces two packages: Windows 8.0 and Windows Phone 8.1. To upgrade Windows package version from 8.0 to 8.1 the following configuration setting must be added to configuration file (config.xml). <preference name='windows-target-version' value='8.1' />

Thanks, Sergey!