Upgrading SQLite to Windows 8.1 Preview

One of the apps I’m currently working on really could use a database. As of now only SQLite is supported as a real database engine for Windows 8 Store apps, next to some home-made file based ‘databases’. For Windows 8 Store apps, just get the SDK through the Visual Studio extension and pick either sqlwinrt or sqlite-net as wrapper to access SQLite from C# code.

But as I’m developing for Windows 8.1 Preview already, I was getting compile errors because the current SDK only works on 8.0. We’ll have to wait for the official release before a new Visual Studio extension will be pushed. For now, you can download the vsix installer from the SQLite download page. This will install the SDK under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81, where you can see v8.1 instead of v8.0.

If you’re using the sqlwinrt wrapper, you’ll have to open the vcxproj file in a text editor, change all v8.0 references to v8.1 and all SQLite.WinRT references to SQLite.WinRT81. Reload the SQLWinRT project, build it and all works fine again. I threw a small sample online on GitHub, so you can download that as well to get started.

Extra resources

Licensed under CC BY-NC-SA 4.0; code samples licensed under MIT.
comments powered by Disqus
Built with Hugo - Based on Theme Stack designed by Jimmy