When I tried to create a build from a changeset, TfsVersioning threw the following exception:
"When the BuildNumberPrefix is used it must be at least 10 and also larger than the Build Number."
The reason was, I also set a build number prefix (100) in the build definition (Version file pattern: <m>.<n>.J.B)
As documented the number for a private (shelf) build is some other "unique" value, but not the build of the day. This number usually is (much) larger than the prefix.
Possible solutions are:
1) Use a another build definition for builds from the changeset without a prefix
2) Temporary remove the prefix from the build defintion for the shelved build
3) Patch TfsVersioning, so that is does not throw the exception if the buildNumberValue is higher than ... say 1000(?) [see VersioningHelper::AddBuildNumberPrefixIfNecessary() ]]