NuGet:如何在 nuget pack 期间指定许可证 URL?

NuGet: How to specify the license URL during nuget pack?

我有一个要推送到 nuget.org 的 .csproj 文件。目前,我正在通过 nuget packnuget push 从命令行执行此操作。这是项目的AssemblyInfo

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("ObservableVector")]
[assembly: AssemblyDescription(@"Observable Vector makes it easy to use the IObservableVector<T> interface in your Windows app.

Find us on GitHub at https://github.com/jamesqo/observable-vector")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("James Ko")]
[assembly: AssemblyProduct("ObservableVector")]
[assembly: AssemblyCopyright("Copyright ©  2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

我想知道的是,如何在打包项目时指定license/project URL 或标签等属性?我认为 Microsoft 没有提供任何属性来管理此类内容,所以是否可以不创建 .nuspec 文件?

我试过查看 command-line documentation,但它似乎没有提到标签或任何类似的东西。

TL;DR 如何在 AssemblyInfo(或从命令行)中指定 license/project URL 之类的内容在创建新的 NuGet 包时?

谢谢。

编辑: 我尝试从终端执行此操作:

nuget pack Foo.csproj -Prop Configuration=Release;ProjectUrl=http://the.url/

不幸的是,它似乎不起作用,因为当我解压缩 nupkg 并打开 nuspec 时,没有提到项目 URL.

嗯,显然在当前版本的 NuGet 中是不可能的:

https://github.com/NuGet/Home/issues/2024

我必须创建一个 nuspec 文件。