Search code examples
visual-studio-2010entity-frameworksql-server-ceentity-framework-5sql-server-ce-4

How to solve false "EF Power Tools: modelEntityContainerName contains characters that are not valid"?


I'm facing an issue that many already faced, with a difference: neither the SDF file name, or the path, contains invalid characters. I've even tried with the Northwind.sdf file and Ikeep getting the same issue.

And example of a full path: D:\Sviluppo\dotnet\EnergiaClima\EnergiaClimaWindows\App_Data\Northwind.sdf

The error message:

System.ArgumentException: The modelEntityContainerName parameter 'D:\Sviluppo\dotnet\EnergiaClima\EnergiaClimaWindows\App_Data\NorthwindsdfContext' contains characters that are not valid.
   at System.Data.Entity.Design.EntityModelSchemaGenerator..ctor(EntityContainer storeEntityContainer, String namespaceName, String modelEntityContainerName)
   at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)

This issue is driving me crazy: does the EF Power Tools Beta 3 actually works in VS2010? If not, what's the best (and easier) way to get an Entity Model from a SQLCE4.0 DB (something that is not creating a 3.5 DB and editing XML files, if possible)?

I can't understand why SQLCE4.0 support is so poor.


Solution

  • Now it's a verified issue: http://entityframework.codeplex.com/workitem/898

    I wonder how the guys test their library: did they ever tried to use EF5 Code First with a SQL CE database?

    Anyway, hopefully it will be solved in EF6.