Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nuget pack [someProject.csproj] won't let me change title or description

Tags:

nuget

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?

like image 956
viggity Avatar asked Mar 05 '14 20:03

viggity


1 Answers

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.

like image 87
viggity Avatar answered Sep 21 '22 05:09

viggity