Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By default compilations using FCS reference FSharp.Core 4.3.0.0 #156

Closed
quasilord opened this issue Jun 4, 2014 · 4 comments · Fixed by #172
Closed

By default compilations using FCS reference FSharp.Core 4.3.0.0 #156

quasilord opened this issue Jun 4, 2014 · 4 comments · Fixed by #172
Labels

Comments

@quasilord
Copy link
Contributor

If no FSharp.Core/mscorlib is referenced when using the "Compile" method in SimpleSourceCodeServices, then FSharp.Core 4.3.0.0 is referenced by default. This has been the cause of some failures on Appveyor.

See https:/fsharp/FSharp.Compiler.Service/blob/13982fa12e0bacaa91e16cced40776fbeb1f77ff/src/fsharp/build.fs#L1563 (FSharp.Compiler.Service.dll itself references FSharp.Core 4.3.0.0, making it usable as widely as possible)

Ramifications:

  • programs compiled with FCS using the implicit default FSharp.Core can't be run on machines where FSharp.Core 4.3.0.0 aren't in the GAC (e.g. machines with only VS2013 installed).
  • the behavior of "FscTest.exe" in FCS differs from the behavior of "fsc.exe" in F# 3.1

FCS should probably default to referencing the version of FSharp.Core in the process hosting FCS, rather than the version referenced in the DLL (these may be different via a binding redirect)

@dsyme
Copy link
Contributor

dsyme commented Jun 4, 2014

Good investigation - it would be great to see this fixed

@forki
Copy link
Member

forki commented Jun 25, 2014

image

same issue in FSharp.Formatting.dll

@dsyme
Copy link
Contributor

dsyme commented Jun 25, 2014

Can you provide an explicit reference to an FSharp.Core? What's your build context here - how do you know which .NET Framework etc. (and FSharp.Core) is referenced by the compilation you're building documentation for?

@forki
Copy link
Member

forki commented Jul 1, 2014

Since FAKE 3.0 we use the FCS directly in FAKE. FAKE comes with FSharp.Core 4.3.1.0 and has AssemblyReferenceRedirect which also uses 4.3.1.0. FCS.dll doesn't respect this, so FAKE scripts fail on some build servers.

The proposed change in #172 resolves this. I put a hacked FCS.dll in the FAKE 3.0.4 nuget package and people report that it works (see fsprojects/FAKE#486).

My problem with FSharp.Core.dll resolution in FSharp.Formatting is also fixed when I apply this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants