package name versus file name

Aug 19, 2011 at 12:12 AM

i wan't my package name to be "some thing that is useful" but when i set <id>some thing that is useful</id> but when i run  "nuget pack <path>\NuGet\Package.nuspec" i get "Package id 'some thing that is useful' is invalid."  

Is there a way to define a package name/id with spaces in it and have nuget pack successfully process that optionally to an output file w/o spaces in the name if necessary?

Coordinator
Aug 19, 2011 at 12:33 AM

Use the <title /> field for the human friendly name with spaces. The Package ID has stricture rules and is something like a namespace. This makes it less of a pain when installing packages using the Powershell console.

Aug 19, 2011 at 1:57 AM

Thanks for the details.   So if the <id> field is kept constant, e.g. using Pascal or Namespace style naming, can the <title> field change from one build to the next and clients will still be able to successfully process updates?

Developer
Aug 19, 2011 at 2:00 AM

Yes. The id is the unique identifier for a package while the Title is just metadata that clients use to display a friendly name.

Aug 19, 2011 at 2:04 AM

was leaving the <title> element out of the package.nuspec that gets created when you run "nuget spec" intentional for some reason, i.e. was the desire to have users not setting title metadata to something different than the <id> defined file output name?

Developer
Aug 19, 2011 at 2:06 AM

Not really, we could add it and just make it the same as the ID by default.

Coordinator
Aug 19, 2011 at 2:37 AM

Log a bug. J

Aug 19, 2011 at 3:31 AM

http://nuget.codeplex.com/workitem/1440