Asked by:

How do I upgrade my Windows Phone Silverlight/SQL CE app to Windows 10?

Question

I have currently a Silverlight app in Windows Phone Store which uses SQL CE database. Data stored in database is very essential and users may not loose it in any situation or they stop using the app.

I know I could in theory upgrade my Silverlight app to use SQLite, then wait for 6-12 months to be sure that all users have upgraded into this SQLite version and only after that publish my Windows 10 version of the app. But I really would not like to do
that because waiting for 6-12 months is too long. My app is used maybe 1-2 times a month by an average user, that's why I think minimum of 6-12 months wait time would be necessary.

I believe many developers have the same issue.

Is any of these options possible:

1. Silverlight is still in Windows 10 so the code for reading SQL CE databases still exists there. So Microsoft could easily implement in Windows 10 APIs an utility function something like ExportSqlCeDatabase(DataContext context, string outputFolder)
which would export all tables in a database to CSV files. Then in my Windows 10 app I could import data from those CSV files into my new SQLite database.

2. Can I prevent automatic application upgrade from a too old Silverlight app to Windows 10 version? Upgrade should be allowed only if user has first installed the Silverlight upgrade which already uses SQLite database. If an automatic upgrade is performed
from a too old Silverlight version still using the SQL CE database, all data is lost.

3. Can Silverlight app access files of another Windows Runtime app (from same publisher) in Windows 10? If this is possible, I could then implement a separate utility application using Silverlight which upgrades the old SQL CE database to SQLite in
the actual Windows Runtime app by accessing its files (read+write access to other app's files needed). This option would be the worst but better than nothing.

I don't believe there's a clean way to read the SQL CE database once the app is upgraded to a Windows Runtime app. The best is probably to upgrade your app to convert from SQLCE to SQLite in Silverlight ASAP. That will give some time for customers
to run it and update their databases before Windows 10 ships and you publish the Windows 10 version of your app.

I am not familiar with Entity Framework yet, but I just noticed that EF7 supports also Windows Phone and Windows Store apps. Could I possibly use it in my upgraded Windows 10 app to access old "SQL CE" databases?

Yes, I already gave up with the other options and started updating my Silverlight app to use SQLite. But I don't like that Microsoft just drops this kind of core features from the OS and then leaves the problems to be solved by developers.
There are users who do not have automatic updates enabled and use very old versions of my app. There is no way I could make sure that all users will get the required Silverlight/SQLite update before I release the Windows 10 version.

Wednesday, May 13, 2015 3:30 PM

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.