Could not load file or assembly System.EnterpriseServices

I am using Unity 3.4.2 and developing a C# script that connects to a Sql Server database using System.Data.SqlClient. I have added a reference to System.Data, and have written the code, and while the code compiles, the Unity project does not compile. I get:

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies.

I have tried adding the System.EnterprisServices.dll to the Assets folder, but that doesn’t work. Any ideas?

So, I was able to debug this some more and got it to work. Whenever Unity complains about a DLL that should be standard to Mono (System.Data for example) you need to navigate within the Unity install directory to the DLL that’s included and copy that to your Assets folder. I’m using a PC, and under my Unity install directory the 2 DLLs I needed were found under /Editor/Data/Mono/lib/mono/2.0. The 2 DLLs I copied were System.Data and System.EnterpriseServices. Once I placed these DLLs into the Assets folder, it worked properly

I went ahead and created a wrapper dll that does most of the work. In the Unity C# code, I simply want to process the results of the Sql call via a DataTable. The error I get now is:

MissingMethodException: Method contains unsupported native code.

Still getting errors, but making more progress. So what I’ve done now is just have my custom wrapper do a Sql call, and nothing gets returned to Unity. I have a simple insert statement into a dummy table in Sql Server, and when I run Unity it works, I see values added to the table. When I add a reference to System.Data and drop it in the Assets folder and return a DataTable, things start to blow up. I have copied the System.Data dll from the Framework64 folder under C:\Windows\Microsoft.NET into the Assets folder of my project. Is this the right dll to copy? I am on a Win 7 64 bit machine with 64bit OS.

The main issue that I get… now that I finally got the editor to stop erring on the fact that I included the System.data.dll and System.Enterprisedervices.dll (that latter dll I found to be necessary to get it past System.Data) is that now I am getting an “Extracted referenced dlls failed.” error message.
I think that this is rather funny, being that these are pretty much standard in the .NET Framework… it should recognize that fact, and just not include them, or, it should recognize that they are “safe” and auto-include them.

I just need to be able to access my flipping database from my groovy game… (please note the bloody sarcasm)…

Any thoughts on accessing a simple 2 tables within a SQL (MSSQL/ran on server 2012) database? I’d love to know.
thank you for the help in advance!!!