Skip to content

Build F# repo with .Net 6.0 because, F# Interactive built in main is still net5.0  #12733

@dsyme

Description

@dsyme

When running F# Interactive it can't load a .NET 6 DLL. because fsi.exe is still .NET 5.0

@brettfo This was the error I mentioned to you on teams. Here the script is doing #r on a .NET 6 DLL.

This isn't a repro but an example of the kind of problem we get:

>\GitHub\dsyme\fsharp\artifacts\bin\fsi\Debug\net5.0\fsi.exe --legacyemit train.fsx --model cnn
System.TypeLoadException: Could not load type 'System.IO.DirectoryInfo' from assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at Helpers.Utils.createDir(String dir)
   at <StartupCode$FSI_0003>.$FSI_0003.main@()
Stopped due to error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions