I've found a simple way to use EF + SqlCompact4.0 with console and winform application in VS2010 SP1. It requires a bit of hack of the db connection string.
<add name="MyEntities" connectionString="metadata=
2 - Edit the app.config. Modify the connection string and point it to the sql server 4.0 compact file. Save the file.
<add name="MyEntities" connectionString="metadata= res://*/MyModel.csdl|res://*/ MyModel.ssdl|res://*/MyModel. msl;provider=System.Data. SqlServerCe.4.0;provider connection string='Data Source="C:\path_to_my_ file\MyDB.sdf"' " providerName="System.Data. EntityClient" />
<add name="MyEntities" connectionString="metadata=
3 - Update the EF model from database (right click on the backgrounf of the model). Now it shows the table of the sdf file.
Ad Perpetuam Rei Memoriam