I know I can change the author and the description if I specify a nuspec in my package (i.e. nuget pack someSpec.nuspec
), but I want my project to the be the "one source of truth". Unfortunately, I can't seem to change the title/description/author via a command line switch. I figured this would work:
nuget pack Persistence.csproj -properties Title=Company.Project.Persistence -IncludeReferencedProjects -o bin\nuget_build
but this doesn't work. Can I do this via command line switch?
After much surfing, it would appear that the only way to change them is by modifying the attributes in AssemblyInfo.cs
in your project. click here to see the nuget codeplex discussion
Title
maps to [assembly: AssemblyTitle("Nuget.Package.Title")]
Version
maps to [assembly: AssemblyVersion("1.0.0.0")]
Author
maps to [assembly: AssemblyCompany("Microsoft")]
Description
maps to [assembly: AssemblyDescription("")]
This seems to have gotten me the desired effect.
Also, the above link says that Id
points to AssemblyTitle
, but as of Nuget 2.8, it would appear that Title
points to AssemblyTitle
and the Id
points to the name of the assembly in the project properties.
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