ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
865 stars 279 forks source link

Fsharp interactive is throwing an exeption and then closing. What do I do? #739

Closed kgonz224 closed 6 years ago

kgonz224 commented 6 years ago

Issue Type

Bug

Description

This is what happens when I launch fsharp interactive. Then it closes:

Microsoft (R) F# Interactive version 4.1
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

>

error FS0193: Could not load file or assembly 'System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

Exception by fsi.exe:
System.Exception: Error creating evaluation session: System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
File name: 'System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
  at Microsoft.FSharp.Compiler.CompileOps+DefaultReferencesForScriptsAndOutOfProjectSources@1809.GenerateNext (System.Collections.Generic.IEnumerable`1[System.String]& next) [0x002c5] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].MoveNextImpl () [0x00016] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].System-Collections-IEnumerator-MoveNext () [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00063] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Compiler.CompileOps.DefaultReferencesForScriptsAndOutOfProjectSources (System.Boolean assumeDotNetFramework) [0x00012] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.CompileOps+GetAllDllReferences@3690.GenerateNext (System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Compiler.CompileOps+AssemblyReference]& next) [0x000d2] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].MoveNextImpl () [0x00016] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].System-Collections-IEnumerator-MoveNext () [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00063] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Compiler.CompileOps+TcAssemblyResolutions.GetAllDllReferences (Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig) [0x0000d] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.CompileOps+TcAssemblyResolutions.SplitNonFoundationalResolutions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig) [0x00000] in <5a85c55ef1806346a74503835ec5855a>:0
  at <StartupCode$FSharp-Compiler-Private>.$IncrementalBuild+Get@1055.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CancellableModule+delay@751[T].Invoke (System.Threading.CancellationToken ct) [0x00000] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CancellableModule.run[a] (System.Threading.CancellationToken ct, Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+Cancellable`1[TResult] _arg1) [0x0001c] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CancellableModule.runWithoutCancellation[a] (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+Cancellable`1[TResult] comp) [0x00005] in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession..ctor (Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSessionHostConfig fsi, System.String[] argv, System.IO.TextReader inReader, System.IO.TextWriter outWriter, System.IO.TextWriter errorWriter, System.Boolean fsiCollectible, Microsoft.FSharp.Core.FSharpOption`1[T] legacyReferenceResolver) [0x002b0]in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Core.PrintfModule+PrintFormatToStringThenFail@1645[TResult].Invoke (System.String message) [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Core.PrintfImpl+SmallStringPrintfEnv`1[TResult].Finish () [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Core.PrintfImpl+FinalFastEnd1@238[TState,TResidue,TResult,A].Invoke (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] env, A a) [0x0002a] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@2806[T2,TResult,T1].Invoke (T2 u) [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession..ctor (Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSessionHostConfig fsi, System.String[] argv, System.IO.TextReader inReader, System.IO.TextWriter outWriter, System.IO.TextWriter errorWriter, System.Boolean fsiCollectible, Microsoft.FSharp.Core.FSharpOption`1[T] legacyReferenceResolver) [0x002e1]in <5a85c55ef1806346a74503835ec5855a>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession.Create (Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSessionHostConfig fsiConfig, System.String[] argv, System.IO.TextReader inReader, System.IO.TextWriter outWriter, System.IO.TextWriter errorWriter, Microsoft.FSharp.Core.FSharpOption`1[T] collectible, Microsoft.FSharp.Core.FSharpOption`1[T] legacyReferenceResolver) [0x0000e] in <5a85c55ef1806346a74503835ec5855a>:0
  at Sample.Microsoft.FSharp.Compiler.Interactive.Main+evaluateSession@290-2.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00030] in <5a85c580046a099ca745038380c5855a>:0
  at Microsoft.FSharp.Control.LazyExtensions+Create@5735[T].Invoke () [0x00000] in <5a85c4dedff9fae1a7450383dec4855a>:0
  at System.Lazy`1[T].CreateValue () [0x00075] in <373b6e083d6e45e498c9082a8eebd27f>:0

VS Code Info

VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:31:21.019Z) OS version: Linux x64 4.15.6-300.fc27.x86_64

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 3500)| |Load (avg)|1, 1, 1| |Memory (System)|7.69GB (1.50GB free)| |Process Argv|/usr/share/code/code --unity-launch| |Screen Reader|no| |VM|0%|
Extensions (1) Extension|Author (truncated)|Version ---|---|--- Ionide-fsharp|Ion|3.17.3

Reproduces only with extensions

Krzysztof-Cieslak commented 6 years ago

@kgonz224 What version of mono do you have?

kgonz224 commented 6 years ago

No idea but that was probably the issue. Just re-installing mono and fsharp fixed the issue. It must have been a de-synchronisation between the nightly updates between mono and fsharp.