The Reverse Engineer Code First process uses the database name (DbConnection.Database) as the entity container name. We don't do any escaping so this may contain invalid characters. This is basically always the case when using SQL Compact since the database name is a full path to the sdf file which includes slashes.
-------------------- Original bug report --------------------
I'm facing an issue that many already faced, but 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.
An 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)
```
Any advice?
-------------------- Original bug report --------------------
I'm facing an issue that many already faced, but 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.
An 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)
```
Any advice?