tpetricek/FSharp.Data — pull request #5 by ovatsus (2012-12-16 00:32:30+00:00)
Title: Support portable libraries

Don't merge this yet, it's still work in progress, I just want some comments before continuing

I've taken a different approach compared to FSharpx and the Freebase type provider

In FSharpx we use FAKE scripts to reuse the same .fsproj for both the portable and normal build, but that hides errors until we run FAKE (which I usually forget). I've used 2 .fsprojs instead, it's a little more work because when we add a file we must add it to the two project files, but it's easier to make sure everything is working without having to leave Visual Studio

In the Freebase type provider, instead of using quotations and splicing like in all the other samples, the expressions are constructed manually because we need to reference the runtime assembly and not the design time assembly where this code is. This makes the code much uglier because of all the reflection code. Instead of that I've created a set of helper methods to traverse the quotations and do the necessary patching. It's still a little flaky, but at least for everything that's being used in the csv provider it's working.

@tpetricek let me know what you think of this approach (https://github.com/ovatsus/FSharp.Data/commit/29de4511c12dba778c7e3ae8788f991d682ac753#L4R51) Are you ok with it? Do you think it might cause performance problems when compiling?