A tale of Visual Studio and SQL Server Compact

I have recently upgraded my SSD disk to a newer and larger one. To avoid the hassle of re-installing everything (I have a lot of things to install) I cloned the disk. Everything worked fine. No problems with the operating system and the applications, except for Visual Studio. Though I could start, edit, build, run, etc. some things just did not work.

When I opened a solution with both C++ and .NET projects I noticed that the C++ projects took a lot to initialize. When I say a lot I mean minutes, many minutes. That didn’t seem right, but I had patience. However, after they finally passed the Initializing phase I noticed that it was no possible to select the configuration and target for the solution to build. The combos were disabled and nothing was displayed there. I could actually build, but it was the last selected configuration and target that were built. I tried deleting generated files (such as the .suo file) and after that, the last selections appeared in those combos, but they where still disabled.


Then I noticed that the properties window was not able to show anything, whether it was the properties of the project, a file or a reference. Everything was very slow. I could edit, but sometimes it took seconds for the text to show up. When I checked the resource monitor, it turned out that Visual Studio was using 17-18% of my CPU.


Finally, I noticed a warning when I closed the solution:


The .sdf file was not present in the specified location. So then I figured it must be a problem with Microsoft SQL Server Compact. Therefore I downloaded the kit from the download center and installed it again. That worked like a charm. Visual Studio was able to create the missing .sdf file, the Visual C++ projects loaded very fast and all other symptoms disappeared.

My conclusion was that cloning the hard-disk didn’t work well for SQL Server Compact. But the problem is that Visual Studio doesn’t react well when this component is missing. It should display the warning about it when it fails to create the file, not when you close the solution.

3 Replies to “A tale of Visual Studio and SQL Server Compact”

  1. Marius, sorry to hear you run into this trouble with VS. We cannot repro the SQL Compact install issues you’ve run into, but we’ve already addressed the visibility problem of the SDF creation error dialog.

    In case it runs into this, VS 2015 Preview will prompt you immediately after the solution load completes (rather than during solution close like in VS 2013).

    Marian Luparu
    Visual C++

  2. I had a similar issue.

    After installing English Visual Studio 2015 Community Edition on my German Win 8.1, SQL Server Compact was missing (with a logged installation failure for SSCERuntime_x64-ENU). I couldn’t even install it manually from the download center. After reading this post I figured out that the German version had no problems installing! (SSCERuntime_x64-DEU.exe)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.