Package ID Specification

Coordinator
Dec 22, 2010 at 4:38 PM
Edited Feb 8, 2011 at 9:19 PM

Hi all, I defined a specification for valid package IDs here: http://nuget.codeplex.com/wikipage?title=Package%20Id%20Specification (yes, there's a regex in there. :))

Package Ids must meet conform to the following package id specification.

  1. Package IDs consist of one or more segments separated by one of the following separator characters: - . _
  2. A segment may only consist of alphanumeric characters. 

Please take a look and let me know what you think. Here are some examples:

Valid IDs

  • hello
  • i.am.a.valid.id
  • nuget-core_is.cool
  • 123.456.789
  • hello._there
  • _neitherami

Invalid IDs

  • i.am.not.valid.
  • bad..id

This is related to issue http://nuget.codeplex.com/workitem/465. I posted some code and unit tests there to ensure the regex is valid.

Dec 22, 2010 at 9:03 PM

'/' may need to be included if we end up using a naming schema as discussed in this thread for pre-release packages.

Coordinator
Dec 22, 2010 at 9:47 PM

Yep. Probably good to not allow it for now until we decide on the naming schema for pre-release packages. That way someone can’t use it for something else and cause confusion later.