Skip to content

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

Closed

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

Activity

  1. dsyme commented on Feb 16, 2022

    @dsyme
    ContributorAuthor

    It looks like this is only the case for the fsi.exe we build in main. I've checked the release branches and they seem to also build net5.0, however when you run dotnet fsi from the .NET SDK it chooses an fsi.dll which runs .NET 6.0 bits

    image

  2. changed the title [-]F# Interactive is still net5.0 [/-] [+]F# Interactive built in main is still net5.0 [/+] on Feb 16, 2022
  3. KevinRansom commented on Feb 16, 2022

    @KevinRansom
    Contributor

    The shipped SDK always contain fsi and fsc that are built to match the sdk shipped the build of the runtime contained in that specific SDK. So the released bits will always be correct, however, the repo is always going to lag a bit, especially since previews of dotnet 7. are pretty soon going to be released.

    I will chat with Brett and see if there is something interesting we can do that makes this less of a problem

  4. KevinRansom commented on Mar 1, 2022

    @KevinRansom
    Contributor

    now builds net6.0: #12769

  5. changed the title [-]F# Interactive built in main is still net5.0 [/-] [+]Build F# repo with .Net 6.0 because, F# Interactive built in main is still net5.0 [/+] on Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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