On my Vista x86 System with Visual Studio 2008-SP1, I created a simple test app to read/write to the DB using EntityFramework (platform build target=x86). It worked fine.
I then copied the contents of my bin\debug directory to my Windows 2003 x64 server, and when I run the console app, I get this Exception:
Unhandled Exception: System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at TestEf.Program.Main(String[ args) in C:\src\testef\Program.cs:line 29
Here are the code lines:
22 EntityConnectionStringBuilder connBuilder = new EntityConnectionStringBuilder();
23 connBuilder.Provider = "System.Data.SQLite";
24 connBuilder.Metadata = @"res://*/TestEf.csdl|res://*/TestEf.ssdl|res://*/TestEf.msl";
25 connBuilder.ProviderConnectionString = ConfigurationManager.AppSettings["DbParams"];
26 Console.WriteLine( connBuilder.ProviderConnectionString );
27 Console.WriteLine( connBuilder.ConnectionString );
28 Console.ReadLine();
29 EntityConnection entConnection = new EntityConnection( connBuilder.ConnectionString );
30 MyEntities myEnts = new MyEntities( entConnection );
Line 26 shows this:
data source=.\TestEf.Db;Version=3;UseUTF16Encoding=False;UTF8Encoding=True;Pooling=True;Max Pool Size=100;BinaryGUID=False;FailIfMissing=True;Compress=False;Cache Size=65536
Line 27 shows this:
metadata=res://*/TestEf.csdl|res://*/TestEf.ssdl|res://*/TestEf.msl;provider=System.Data.SQLite;provider connection string="data source=.\TestEf.Db;Version=3;UseUTF16Encoding=False;UTF8Encoding=True;Pooling=True;Max Pool Size=100;BinaryGUID=False;FailIfMissing=True;Compress=False;Cache Size=65536
Here are the contents of the bin directory:
..
6,144 TestEf.Db
17,408 TestEf.exe
767 TestEf.exe.config
26,112 TestEf.pdb
14,848 TestEf.vshost.exe
767 TestEf.vshost.exe.config
490 TestEf.vshost.exe.manifest
425,984 System.configuration.dll
667,648 System.Core.dll
53,248 System.Data.DataSetExtensions.dll
2,933,248 System.Data.dll
2,879,488 System.Data.Entity.dll
839,680 System.Data.SQLite.DLL
174,080 System.Data.SQLite.Linq.dll
185,042 System.Data.SQLite.xml
3,149,824 System.dll
966,656 System.Runtime.Serialization.dll
258,048 System.Security.dll
2,048,000 System.Xml.dll
139,264 System.Xml.Linq.dll
Help?!
Thanks.