Skip to content

FSharp.Core isn't implicitly defined after upgrading to 7.0.201 #14823

Closed

Description

@weslenng

I have a large codebase using central package management and after upgrading .NET version from v7.0.102 to v7.0.201 this error started to throw up

$ dotnet build Repro.fsproj

MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET
  Determining projects to restore...
  Restored /Users/omppye/repos/repro-fsharp-1/Repro.fsproj (in 93 ms).
/Users/omppye/repos/repro-fsharp-1/Program.fs(3,9): error FS3353: Feature 'string interpolation' requires the F# library for language version 5.0 or greater. [/Users/omppye/repos/repro-fsharp-1/Repro.fsproj]

Build FAILED.

/Users/omppye/repos/repro-fsharp-1/Program.fs(3,9): error FS3353: Feature 'string interpolation' requires the F# library for language version 5.0 or greater. [/Users/omppye/repos/repro-fsharp-1/Repro.fsproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.20

Reproduction steps

Just clone https://github.com/weslenng/repro-fsharp-1 and try to build using .NET v7.0.201

Expected behavior

Build as usual like in the v7.0.102

Activity

  1. added this to the Backlog milestone on Feb 28, 2023
  2. KevinRansom commented on Feb 28, 2023

    @KevinRansom
    Contributor

    CentralPackageManagement is not really compatible with automatically taking an updated library.
    However in the targets.props of your repo
    set DisableImplicitSystemValueTupleReference
    and DisableImplicitFSharpCoreReference to false

    That should cause the implicit version to be computed and included.

    I hope this helps,

    Kevin

  3. weslenng commented on Feb 28, 2023

    @weslenng
    Author

    It worked well, thanks!
    Do you have any thoughts on how the version upgrade affected this anyway?

  4. KevinRansom commented on Feb 28, 2023

    @KevinRansom
    Contributor

    In this release we added direct support for CentralPackageManagement to disable ImplicitReference of FSharpCore. The change you just made disabled that.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions