fsprojects / fsprojects/FSharpLint

.NET tool is net5

Open
#483 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Description

Hello, I'm wondering if there is a strict limitation of using net5 for the dotnet tool.
As we are still on netcoreapp3.1 we can't install the tool.

Repro steps

Please provide the steps required to reproduce the problem

dotnet tool install dotnet-fsharplint

global.json:

{
  "sdk": {
    "version": "3.1.402",
    "rollForward": "latestMinor"
  }
}
Expected behavior

Well, I was hoping we could use the tool.

Actual behavior
error NU1202: Package dotnet-fsharplint 0.19.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any. Package dotnet-fsharplint 0.19.0 supports: net5.0 (.NETCoreApp,Version=v5.0) / any
The tool package could not be restored.
Tool 'dotnet-fsharplint' failed to install. This failure may have been caused by:
Known workarounds

What you can do in these kinds of situation is target 3.1 and add the <RollForward>Major</RollForward> property in your fsproj. (example).
That way you can support the current LTS but people on newer SDKs can also just use it.

But, maybe this is all very much by design and I'm missing something.

Related information
  • Operating system Win 10
  • .NET Runtime, CoreCLR or Mono Version : .NETCore 3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dotnet-fsharplint tool project and inspect its target framework, then compare it with the netcoreapp3.1 constraint in global.json. Review the linked Fantomas fsproj example and the reported dotnet tool install failure. Done means establishing whether the tool can support the requested runtime and documenting or implementing the agreed compatibility change.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.