如果我使用 nuget.exe CLI,如何指定作者

Fro*_*art 7 c# nuget

如果我使用nuget.exeCLI,如何指定作者?

nuget 包 some.csproj -IncludeReferencedProjects

有什么选择-author吗?我在文档中找不到任何内容。

Sco*_*ain 4

您需要使用properties命令传入替换令牌的值。您将需要为作者创建一个新令牌,因为除 之外$configuration$,项目中的值将优先于在命令行上分配给相同令牌的任何值,并且默认令牌是从项目中$author$提取的。AssemblyCompany

在 nuspec 文件中

<authors>$CustomAuthor$</authors>
Run Code Online (Sandbox Code Playgroud)

从命令行

nuget pack some.csproj -IncludeReferencedProjects -properties CustomAuthor="Scott Chamberlain"
Run Code Online (Sandbox Code Playgroud)