rookboom / Elucidate

Visual Studio extension for rich inlined comments using MarkDown
36 stars 4 forks source link

Embedding F# output and values? #4

Open dsyme opened 9 years ago

dsyme commented 9 years ago

I'm trying to embed F# values, e.g. this example: http://tpetricek.github.io/FSharp.Formatting/evaluation.html

I get the error "Exception: Output, it-value and value references should be replaced by FSI evaluatorOne or more errors occurred."

Is this not supported yet? Any reason not to?

(** 
### Evaluation demo 
The following is a simple calculation: *)
let test = 40 + 2

(** We can print it as follows: *)
(*** define-output:test ***)
printf "Result is: %d" test

(** The result of the previous snippet is: *)
(*** include-output:test ***)

(** And the variable `test` has the following value: *)
(*** include-value: test ***)
rookboom commented 9 years ago

Not supported yet, but this should be easy to add. Coming soon...

rookboom commented 9 years ago

I am having a hard time getting the F# evaluator to be instantiated when running as a plugin. Permissions issue?

rookboom commented 9 years ago

I still get an exception when instantiaing FsiEvaluator(). Initially it complained about not being able to resolve FSharp.Core.dll. Adding the FSharp.Core.opdata and sigdata files to my project seemed to help a bit. I now get the following error thrown by FSharp.Compiler.Services:

Error creating evaluation session: StopProcessing "{Exception = AssemblyNotResolved; Phase = Interactive;}"