FSharp.Compiler.CodeDom for VS2008 and VS2010 side-by-side
- by SztupY
I'm using FSharp.Compiler.CodeDom to dynamically create F# classes. The problem is, that I have both VS2008 and VS2010 on my computer side-by-side (they works fine), and using F# in this configuration is buggy at best:
If I don't install InstallFSharp.msi, then under VS2008 the built classes complain about not finding FSharp.Core (even if they're referenced)
If I install InstallFSharp.msi, then under VS2008 the built classes will use the F# built for VS2010, and will throw a binary-incompatibility exception, because it will load the .net4 variant:
FSC: error FS0219: The referenced or default base CLI library 'mscorlib' is binary-
incompatible with the referenced F# core library 'C:\Program Files (x86)\Microsoft
F#\v4.0\FSharp.Core.dll'. Consider recompiling the library or making an explicit reference
to a version of this library that matches the CLI version you are using.
If I replace the F# found at the previous location to the separately installed dll-s, then of course VS2010 will complain about binary-incompatibility
Am I overlooking something, or they won't simply work for a shared environment like this? This might mean real problems when I deploy the applications.
Thanks