NuGet/Home

Repository element missing from .nuspec on running nuget pack

Open

#9,142 建立於 2020年2月6日

在 GitHub 查看
 (5 留言) (1 反應) (0 負責人)HTML (292 fork)batch import
Area:PackageDefinitionFunctionality:PushPriority:2Type:Docshelp wanted

倉庫指標

Star
 (1,459 star)
PR 合併指標
 (平均合併 464天 23小時) (30 天內合併 1 個 PR)

描述

Details about Problem

NuGet product used: NuGet.exe

NuGet version: 5.0.2.5988

VS version : VS 2019 16.5.0 Preview 3.0

Detailed repro steps so we can see the same problem

  1. Open .nuspec file and remove type="git" from the repository element. Leave the url attribute there with a url to your repo

  2. "type" attribute is optional in nuspec.xsd

  3. run nuget pack .\app.nuspec

  4. The nuspec generated in the nupkg doesnt have the repository element

  5. This causes failures in uploading private packages to GitHub package registry

...

Issue doesnt repro when running pack from VS or running pack on the csproj

貢獻者指南