Encountered this problem, I am downloading the SQL Server Compact 4.0 installation can be resolved. The download address is:
http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=033cfb76-5382-44fb-bc7e-b3c8174832e2& Displaylang=zh-cn
When looking for a solution, I also found an example of learning MVC, the MVC Music store http://mvcmusicstore.codeplex.com/The example I'm studying now is contosouniversity
When looking for a solution, find a few answers and collect them here.
In C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG machine.config (XML file) there is a field in the <DbProviderFactories>
Add registration, <name= "SqlClient data Provider" > or <name= "MySQL data Provider"
<system.data>
<DbProviderFactories>
<add name= "ODBC data Provider" invariant= System.Data.Odbc "description=". Net Framework Data Provider for ODBC "type=" System.Data.Odbc.OdbcFactory, System.Data, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089 "/>
<add name= "OLE DB data Provider" invariant= "System.Data.OleDb" description= ". Net Framework Data Provider for OLE DB" Typ E= "System.Data.OleDb.OleDbFactory, System.Data, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" />
<add name= "OracleClient data Provider invariant=" System.Data.OracleClient "description=". Net Framework Data Provider for Oracle "type=" System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/>
<add name= "SqlClient data Provider" invariant= "System.Data.SqlClient" description= ". Net Framework Data Provider for SQL Server "Type=" System.Data.SqlClient.SqlClientFactory, System.Data, version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/>
<add name= "SQL Server CE data Provider" invariant= "Microsoft.SqlServerCe.Client" description= ". NET Framework Data Provider for Microsoft SQL Server Edition "type=" Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91 "/>
<add name= "MySQL data Provider" invariant= "MySql.Data.MySqlClient" description= ". Net Framework Data Provider for MySQL "Type=" MySql.Data.MySqlClient.MySqlClientFactory, Mysql.data, version=5.0.2.0, Culture=neutral, Publickeytoken=c5687fc88969c44d "/>
<add name= "SqlClient data Provider" invariant= "System.Data.SqlClient" description= ". Net Framework Data Provider for SQL Server "Type=" System.Data.SqlClient.SqlClientFactory, System.Data, version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/>
</DbProviderFactories>
</system.data>
In the end I want to add some MVC to develop the software that needs to be installed,
Before you to start, make sure your have the following software installed on your computer:
visual Studio SP1 or Visual Web Developer Express SP1 (If you are more than one of these links, the following items would be installed automatically.)
asp.net MVC 3 Tools Update
microsoft SQL Server Compact 4.0
microsoft Visual Studio SP1 Tools for SQL Server Compact 4.0