QuotationCompiler icon indicating copy to clipboard operation
QuotationCompiler copied to clipboard

Struggling to get the library working

Open cognociente opened this issue 10 years ago • 5 comments

I am trying to reference the latest version 0.0.7 via nuget and can't get the hello world sample working in a simple Console Application test project EVEN using all the tricks I learned to get it working from last time.

Error

An unhandled exception of type 'QuotationCompiler.QuotationCompilerException' occurred in QuotationCompiler.dll

Additional information: Compilation failed with errors:

** unknown (1,1)-(1,81) parse error Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Setup

I am using VS2015. I have tried using both F# 4.0 and 3.1 mainly in conjunction with .NET framework 4.5.2 It is pulling in the lowest compatible version of FSCS, being 1.3.1.0 (it seems to break earlier in the process if I use more up-to-date versions of FSCS) I have set the FSharp.Core library to NOT make a local copy st FSCS can pick up the optdata and sigdata from the common location [this is what fixed it last time] I have also tried with a local copy of FSharp.Core (in bin\debug) with the optdata & sigdata copied into this directory. I have also tried fiddling in the app.config file with the binding redirects of FSharp.Core to no avail.

Help would be much appreciated.

cognociente avatar Sep 24 '15 10:09 cognociente

Hi,

The library has not been tested for VS2015. You should use VS2013. Adding support for VS2015 and the F# 4.0 compiler requires considerable work (including moving to FSCS > 1.4 and adding support for the updated quotation representations), for which unfortunately I do not currently have the time.

I would be happy to accept pull requests that address this issue, though.

eiriktsarpalis avatar Sep 24 '15 10:09 eiriktsarpalis

Thanks for the info. For a start am I correct in saying that it should be able to work under the following (maximum/latest version) configuration without changes to the code base:

.NET 4.5.2 F# 3.1 FSCS < 1.4

(Implicit in the above is that I presume it is not VS2015 that is the problem but F# 4.0 & .NET 4.6)

cognociente avatar Sep 24 '15 11:09 cognociente

Yes but keep in mind that VS 2015 still uses the F# 4.0 compiler even if your projects target FSharp.Core 3.1

eiriktsarpalis avatar Sep 24 '15 11:09 eiriktsarpalis

I did a bit of further digging and testing a while ago which involved some (temporary) resolution of the issue. See the following:

https://github.com/fsharp/FSharp.Compiler.Service/issues/424

In summary: It didn't seem to be an F# version thing; instead it needed a manual assembly resolution to the MSBUILD assemblies.

cognociente avatar Oct 15 '15 06:10 cognociente

It also does not work in VS2017. I've played with versions of fsharp compiler services, but ran into a lot of issues.

fjoppe avatar Sep 19 '18 09:09 fjoppe