Hmm. Actually all of the internal classes needed for System.Data.Linq are present with the following exceptions:
Also missing is the majority of the partial class:
That is literally all that is missing. Now, as for why those are missing? Well every single one of those classes indicated are generated code. The
Strings classes are presumable derived from the missing .resx files. I have no idea how they go about generating the Error classes, but they definitely do. The global classes are generated by filling in metadata about the release, and other DLLs compiled as part of the framework. (Although only
global::ThisAssembly appears to be referenced. The others might be used by unreleased unit tests, or might just be standardized classes availble in every framework dll, but only used by some.
I have successfully built
System.Data.Linq.dll (referencing the official 4.0 framework reference assemblies) by pasting reflector de-compiled versions of those classes in the project, and setting the correct set of Define Directives. (Both
SYSTEM_DATA_LINQ must be defined).
I did not actually test that it works, and without the resource files it would probably fail badly if an error occurs and it tries to throw an exception, bu the successful compilation proves that all the other internal classes are there.
Of course, for Mono this might be only of limited use, since it relies heavily on System.Data, and especially System.Data.SqlClient. I am not sure if Mono’s implementation is a close enough match that it could work.
As for using Microsoft’s implementation for Mono, while it appears that all of the C# code for System.Data was released (minus a very similar set of generated files), portions of the code known as SNI were written in C++/CLI and were not released as open source. Interestingly, but not usefully, the C++/CLI source in was published on http://referencesource.microsoft.com/ (although are only visible if you use the download link, since the Rosyln generated site does not understand C++). Obviously they compile the C# code to a netmodule, and then link it in with the unmanaged code using
link.exe. The last I knew Mono lacked a C++/CLI compiler.
Hope the above is helpful, or at least interesting.