【问题标题】:NuGet: How to specify the license URL during nuget pack?NuGet:如何在 nuget 包期间指定许可证 URL?
【发布时间】:2016-02-01 06:18:23
【问题描述】:

我有一个 .csproj 文件,我想将它推送到 nuget.org。目前,我通过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)]

我想知道的是,如何在打包项目时指定许可证/项目 URL 或标签等属性?我认为微软没有提供任何属性来管理这样的事情,所以是否可以不创建 .nuspec 文件?

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

TL;DR在创建新的 NuGet 包时,如何在 AssemblyInfo(或从命令行)中指定许可证/项目 URL 等内容?

谢谢。

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

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

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

【问题讨论】:

    标签: c# .net msbuild nuget .net-assembly


    【解决方案1】:

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

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

    我必须创建一个nuspec 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-11
      • 2012-04-09
      • 1970-01-01
      • 2012-06-30
      • 2020-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-04
      相关资源
      最近更新 更多