This issue is generally caused when the Microsoft .NET Framework and
Microsoft SQL Server components are not fully installed or up to date. If
you go to Control Panel-->Add/Remove Programs you can check to see what
versions are installed. Both should be version 3.5 SP1.
If you need to download one or both of these applications they can be found
MS SQL Server Compact