fsprojects / fsprojects/Paket

Workflow/Design Issue in netcore world

Open
#3,556 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

Maybe I'm doing stuff the wrong way but recently I often encounter the following issue:

  1. Try to add a package to your paket.dependencies file.
    For demo purposes, let's add nuget NuGet.Protocol
  2. run paket install
  3. Try to build your project
    \Fake.DotNet.NuGet.fsproj : error NU1202: Package NuGet.Protocol 5.0.0 is not compatible with net46 (.NETFramework,Version=v4.6). Package NuGet.Protocol 5.0.0 supports:
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - net472 (.NETFramework,Version=v4.7.2)
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - netstandard2.0 (.NETStandard,Version=v2.0)
    
    OK the package is not compatible.
  4. Replace paket.dependencies with nuget NuGet.Protocol < 5 to get the latest package which supports net462 (which I'm trying to target)
  5. Run paket install
  6. Try to build your project
    \Fake.DotNet.NuGet.fsproj : error NU1202: Package NuGet.Configuration 5.0.0 is not compatible with net46 (.NETFramework,Version=v4.6). Package NuGet.Configuration 5.0.0 supports:
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - net472 (.NETFramework,Version=v4.7.2)
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - netstandard2.0 (.NETStandard,Version=v2.0)
    \Fake.DotNet.NuGet.fsproj : error NU1202: Package NuGet.Packaging 5.0.0 is not compatible with net46 (.NETFramework,Version=v4.6). Package NuGet.Packaging 5.0.0 supports:
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - net472 (.NETFramework,Version=v4.7.2)
    \Fake.DotNet.NuGet.fsproj : error NU1202:   - netstandard2.0 (.NETStandard,Version=v2.0)
    
    Ok lets tell paket to use <5 for NuGet.Packaging and NuGet.Configuration as well.
  7. add nuget NuGet.Packaging < 5 and nuget NuGet.Configuration < 5 to paket.dependencies. Go back to 5. until build succeeds.

This not only is highly frustrating; it feels like doing package management myself. I'm faster with searching the latest compatible versions by hand.

Also, you now have lots of transitive packages listed in the paket.dependencies which breaks the concept/design of paket itself.

I feel like this scenario will become more common in the future. This "only" happens if you try to support older frameworks. If you abandon old frameworks and only support "latest", this shouldn't be as big of an issue.

Note: The only thing I wanted to do is to add a single dependency.

Expected behavior

Somehow being able to improve that use-case

Actual behavior

Frustrating and manually resolving stuff.

Known workarounds

Doing package management by hand. Only support "latest".

Contributor guide

No contributing guide indexed for this repository

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 paket.dependencies examples and the paket install workflow described in the issue, focusing on dependency resolution for older target frameworks such as net462. Done would mean adding one compatible dependency does not require manually pinning incompatible transitive packages, while preserving the intended minimal dependency declarations.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.