FrozenHeart FrozenHeart - 27 days ago 13
C# Question

How can I specify an author if I'm using nuget.exe CLI

How can I specify an author if I'm using

nuget.exe
CLI?


nuget pack some.csproj -IncludeReferencedProjects


Is there any option like
-author
? I can't find any in the documentation.

Answer

You need to use the properties command to pass in values for the replacement tokens. You will need to create a new token for authors becaues with the exception of $configuration$, values in the project will be used in preference to any assigned to the same token on the command line and the default $author$ token is pulled from AssemblyCompany in the project.

In the nuspec file

<authors>$CustomAuthor$</authors>

From the command line

nuget pack some.csproj -IncludeReferencedProjects properties CustomAuthor="Scott Chamberlain"