I'm using EntityFramework Reverse POCO Generator in VS2012
VS2012...
Here's my connection string:
<connectionStrings>
<add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlServerCe.4.0;provider connection string="data source=C:\SomeDatabase.sdf"" providerName="System.Data.EntityClient" />
</connectionStrings>
Updated the .tt file to point to my connectionString and I get this error (warning) when I save::
Warning 1 Running transformation: Failed to load provider "System.Data.EntityClient" - Unable to find the requested .Net Framework Data Provider. It may not be installed.
So it is not generating any code. Any ideas?
here's a snippet of the Database.tt file:
<#@ include file="EF.Reverse.POCO.Core.ttinclude" #>
<#
// v2.5.0
// Please make changes to the settings below.
// All you have to do is save this file, and the output file(s) is/are generated. Compiling does not regenerate the file(s).
// Misc settings **********************************************************************************************************************
// Namespace = ""; // Override the default namespace here
DbContextName = "MyContext";
ConnectionStringName = "Entities"; // Searches for this connection string in config files listed below
ConfigurationClassName = "Configuration"; // Configuration, Mapping, Map, etc. This is appended to the Poco class name to configure the mappings.
ConfigFilenameSearchOrder = new[] { "app.config", "web.config", "app.config.transform", "web.config.transform" }; // Add more here if required. The config files are searched for in the local project first, then the whole solution second.
MakeClassesPartial = true;
...
Found the answer, the problem was in the ConnectionString
should be as follows:
<connectionStrings>
<add name="Entities" connectionString="Data Source=C:\StoreContainer.sdf"
providerName="Microsoft.SqlServerCe.Client.4.0" />
</connectionStrings>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With