fsprojects / fsprojects/Paket

dotnet pack fails on core2.1 SDK

Open
#3,657 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

I was tasked with migrating our company repository to new CI servers. Unfortunately, I have to comply with a template for repository, so no more paket pack.

I managed to fix all the problems - repository works on my machine, but fails on Jenkins. I narrowed it down to the fact, that I have dotnet core 2.2, and on the server it is stuck on 2.1 for a moment.

I get an error:
paket_repro\.paket\Paket.Restore.targets(331,5): error : The licenseUrl and license elements cannot be used together.

Repro steps

Reproduction repo

Using json.global I force older SDK and dotnet pack fails. Remove json.global, it works.

Expected behavior

dotnet pack should not error

Known workarounds

Update SDK to 2.2

Is there a way to make this work without updating SDK to 2.2? It will take some time until tools update all agents to 2.2.

Maybe fallback to older paket? If so, which one?

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 linked reproduction repository and its json.global SDK pin, then inspect Paket.Restore.targets around line 331 while comparing SDK 2.1 and 2.2 behavior. Done means dotnet pack succeeds with the 2.1 SDK without requiring an SDK upgrade.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.