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.
To use any command, open a command window or bash shell, then run nuget followed by the command and appropriate options, such as nuget help pack (to view help on the pack command). This documentation reflects the latest version of the NuGet CLI.
You could add the executable to the content folder of the NuGet package. When the package is installed on a project, the executable will then appear as a file in the project. From the NuGet docs: Files in the content folder are copied to the root of your application when the package is installed.
In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.
Note that the source URL for nuget.org is https://api.nuget.org/v3/index.json .
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With