Skip to content

Error about FSharp.Core when updating #131

Open

Description

@breyed

Wtih a F# project with a fsproj file opening with <Project Sdk="Microsoft.NET.Sdk"> and targeting netcoreapp3.1, running "dotnet outdated -u" gives this error:

» RestApi                                                                                                                                       
  [.NETCoreApp,Version=v3.1]
  FSharp.Core  5.0.0 -> 5.0.1
...
Upgrading package FSharp.Core...
An error occurred while upgrading RestApi

FSharp.Core isn't referenced by the fsproj file.

Activity

  1. slang25 commented on Mar 4, 2021

    @slang25
    Member

    Thanks for the report. FSharp.Core is an implicit reference (see here), I'm not sure what we should be doing with implicit references, because as an F# user there are times where I've wanted to upgrade the version of FSharp.Core from what is referenced implicitly. I'll have a think.

  2. breyed commented on Mar 4, 2021

    @breyed
    Author

    I tried adding an explicit reference to FSharp.Core 5.0.1 and it didn't make a difference.

  3. slang25 commented on Mar 4, 2021

    @slang25
    Member

    If you change Include to Update in the PackageReference element that would do it, otherwise MSBuild will just ignore your package as assume it to be a duplicate.

  4. breyed commented on Mar 4, 2021

    @breyed
    Author

    That worked. Should dotnet-outdated insert the Update package references instead of reporting an error?

  5. slang25 commented on Mar 5, 2021

    @slang25
    Member

    We call the dotnet CLI under the hood and do a dotnet add, however for implicit packages I think we should report them, but not upgrade them IMO.

  6. coderpatros commented on Mar 5, 2021

    @coderpatros
    Member

    @slang25 I think that would be a good approach too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions