Skip to content

Commit c5a64b0

Browse files
committed
fix 383 - docs
1 parent 53dac83 commit c5a64b0

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/content/corelib.fsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,31 @@ convert them to command-line arguments is to [crack an F# project file](http://f
6363
Alternatively you can compute SDK paths yourself, and some helpers to do this are in [the tests for FSharp.Compiler.Service.dll](https://github.com/fsharp/FSharp.Compiler.Service/blob/8a943dd3b545648690cb3bed652a469bdb6dd869/tests/service/Common.fs#L54).
6464
6565
66+
What about if I am processing a script or using ``GetCheckOptionsFromScriptRoot``
67+
-------------------------------------------------------------------------
68+
69+
If you do _not_ explicitly reference an FSharp.Core.dll from an SDK location, or if you are processing a script
70+
using ``FsiEvaluationSession`` or ``GetCheckOptionsFromScriptRoot``, then an implicit reference to FSharp.Core will be made
71+
by the following choice:
72+
73+
1. The version of FSharp.Core.dll statically referenced by the host assembly returned by ``System.Reflection.Assembly.GetEntryAssembly()``.
74+
75+
2. If there is no static reference to FSharp.Core in the host assembly, then
76+
77+
- For FSharp.Compiler.Service 0.x series, a reference to FSharp.Core version 4.3.0.0 is added
78+
79+
- For FSharp.Compiler.Service 1.3.1.x (F# 3.1 series), a reference to FSharp.Core version 4.3.1.0 is added
80+
81+
- For FSharp.Compiler.Service 1.4.0.x (F# 4.0 series), a reference to FSharp.Core version 4.4.0.0 is added
82+
6683
Do I need to include FSharp.Core.optdata and FSharp.Core.sigdata?
6784
--------------------------------------
6885
6986
If your compilation arguments explicitly reference an FSharp.Core.dll from an SDK location, then FSharp.Core.sigdata and FSharp.Core.optdata should be alongside the DLL
7087
(if these files are not installed, then that's a bug in the F# SDK installation). If your compilation
7188
arguments are always making an explicit reference, then you should _not_ include FSharp.Core.optdata and FSharp.Core.sigdata as part of your application.
7289
73-
74-
If you do _not_ explicitly reference an FSharp.Core.dll from an SDK location, then an implicit reference will be made
75-
to which ever version of FSharp.Core.dll your tool is running. This means your tool will almost certainly implicitly reference the FSharp.Core.dll
90+
If you are relying on an implicit reference (e.g. for script processing, see above), this means your tool may reference the FSharp.Core.dll
7691
that is part of your application. In this case, you may either get an error that FSharp.Core.optdata and FSharp.Core.sigdata are not
7792
found alongside FSharp.Core.dll. **If you want to implicitly reference the FSharp.Core.dll you are including in your application,
7893
then also add FSharp.Core.sigdata and FSharp.Core.optdata as two additional files to your application**. When using ``CompileToDynamicAssembly``, this problem

0 commit comments

Comments
 (0)