fsharp / fsharp-compiler-docs

Doc build for FSharp.Compiler.Service
https://fsharp.github.io/fsharp-compiler-docs
MIT License
279 stars 123 forks source link

FCS v38.0 fails with the official sample in net472 app #960

Closed nightroman closed 4 years ago

nightroman commented 4 years ago

The sample code is from http://fsharp.github.io/FSharp.Compiler.Service/interactive.html

It works in net50 and fails in net472.

Steps:

dotnet run

Actual result

It fails

Unhandled Exception: System.Exception: Error creating evaluation session: StopProcessingExn None
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1433.Invoke(String message) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1433
   at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession..ctor(FsiEvaluationSessionHostConfig fsi, String[] argv, TextReader inReader, TextWriter outWriter, TextWriter errorWriter, Boolean fsiCollectible, FSharpOption`1 legacyReferenceResolver) in F:\workspace\_work\1\s\src\fsharp\fsi\fsi.fs:line 2829
   at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.Create(FsiEvaluationSessionHostConfig fsiConfig, String[] argv, TextReader inReader, TextWriter outWriter, TextWriter errorWriter, FSharpOption`1 collectible, FSharpOption`1 legacyReferenceResolver) in F:\workspace\_work\1\s\src\fsharp\fsi\fsi.fs:line 3155
   at Program.main(String[] argv) in C:\Users\rjq\Desktop\FCS_net5_issue\Program.fs:line 20

Expected result

It works and prints "43".

Related question/issue

Is FCS v38.0 supposed to work in net472? I thought so but maybe I missed something fundamental.

If it is supposed to work, I have another issue from the actual application with a different error on creating a session:

error FS0078: Unable to find the file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Workflow.Compiler.exe.dll' in any of C:\Windows\Microsoft.NET\Framework64\v4.0.30319 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF C:\Bin\Far\x64 C:\Bin\Far\x64\

FCS_net5_issue.zip

nightroman commented 4 years ago

Should I submit this to the parent repository perhaps? There is not much activity in here. And v38.0 changes look not merged. (I've posted here because the issue is also a question, I am not sure)

baronfel commented 4 years ago

Yes please, FCS is now built and published directly from dotnet/fsharp.

nightroman commented 4 years ago

Done -- https://github.com/dotnet/fsharp/issues/10467 Closing this.

baronfel commented 4 years ago

Thank you @nightroman! I'll be working on updating this repository's readme to specify the new situation, as well as triaging and migrating existing issues to dotnet/fsharp