fsprojects / fsprojects/Paket

dotnet pack stops working with empty paket.references

Open
#2,323 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

dotnet pack crashes if paket.references is empty. It's a template project so I'd like to have paket.references even if the file itself is empty.

Repro steps
mkdir xxx && cd xxx && dotnet new console && dotnet restore
dotnet pack

NOTE: so far dotnet pack works. Now we need paket available (I have a batch file for that curl -L -o paket.cmd http://bit.ly/2ooaInt)

Now, let's create empty paket.depenencies and paket.references:

paket init && touch paket.references && paket install && dotnet restore
dotnet pack

dotnet pack just stopped working.

Expected behavior

It creates nuget package.

Actual behavior
C:\dev\xxx\.paket\Paket.Restore.targets(59,5): error MSB3073: The command ""C:\dev\xxx\.paket\paket.exe" fix-nuspec file "obj\xxx.1.0.0.nuspec" references-file "C:\dev\xxx/obj/xxx.csproj.references" " exited with code 1. [C:\dev\xxx\xxx.csproj]
Known workarounds

Do not use empty paket.references

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 by reproducing the failure with the listed dotnet and paket commands, then inspect .paket/Paket.Restore.targets around line 59 and the generated obj/xxx.csproj.references file. Done means dotnet pack succeeds and creates the NuGet package when paket.references is empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, tooling
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.