I've created a version of Linq To XSD 1.1.0 that works under Compact Framwork 3.5.
I shall describe the basic steps here:
Grab changeset 41754 and extract the \tags\1.1.0 folder
Create a new Smart Device DLL (XObjects_NETCF) and copy into it the Src folder from XObjects, include all of the code files. Set the Assembly name to be the same as XObjects but add .Netcf to the end
Selectively exclude any code files that require anything from System.CodeDom
Using Redgate’s .NET Reflector, decompile mscorlib to get some code to implement a few bits missing from the Compact Framework:
Replace the reference to System.Type.EmptyTypes with new Type
Copy the .targets file adding _netcf before .targets (It’s in XOTask)
Add it to the XOTask project, set Copy To Output to Copy If Newer.
Now, when using LinqToXSD in a NETCF project, add the _NETCF.targets file instead and it should work.
A better way to do this would be to separate Xml.Schema.Linq.dll into 2 DLLs.
Xml.Schema.Linq.dll – Just the runtime code, minus everything that references System.CodeDom
Xml.Schema.Linq.CodeGen.dll – Everything that was removed from the first DLL.
LinqToXSD.exe would then reference both of those DLLs to work, desktop and compact framework apps would just reference the runtime.
Rather that pinching bits from mscorlib, add #if NETCF switches everywhere to not compile the bits that aren’t in the Compact Framework and have two csproj files pointing at the same Src folder.
If the guy that writes LinqToXSD wants a copy of my working code, give me a shout and I’ll zip it up and email it to you.