fsprojects / fsprojects/Paket

Creating a package with .snupkg symbols fails with error NU5005

Open
#3,685 17 comments 2 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

Repro steps

  1. Create the following project:
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  </PropertyGroup>
  <Import Project=".paket\Paket.Restore.targets" />
</Project>
  1. paket convert-from-nuget.

  2. dotnet pack

Expected behavior

A .snupkg file would be created alongside with its main .nupkg package file.

Actual behavior

C:\Users\teots\code\paket-bug\.paket\Paket.Restore.targets(304,5): error NU5005: Failed to build package. Ensure 'C:\Users\teots\code\paket-bug\obj\Debug\paket-bug.1.0.0.nuspec' includes source and symbol files. For help on building symbols package, visit https://docs.nuget.org/. [C:\Users\teots\code\paket-bug\paket-bug.csproj]

Additional information

I saw a paket-bug.1.0.0.symbols.nuspec file inside obj/Debug. Was Paket trying to create a legacy .symbols.nupkg file? Maybe my previous fix in #3636 was not enough.

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

Reproduce the issue with the shown project, paket convert-from-nuget, and dotnet pack. Start at .paket/Paket.Restore.targets around line 304 and inspect the generated obj/Debug nuspec files, including the .symbols.nuspec. Done means dotnet pack creates the expected .snupkg alongside the main .nupkg without NU5005.

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
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.