Skip to main content
All CollectionsMyGet HelpBuild Services
How do I manually specify the build number for NuGet packages?
How do I manually specify the build number for NuGet packages?
Toshi Dávila avatar
Written by Toshi Dávila
Updated over 5 years ago

The convention-based build will auto-increment the version number. A custom build script (examples at http://docs.myget.org/docs/reference/custom-build-scripts) can override this behaviour and use a tool like GitVersion or something similar to set the version number. A custom build script would also let you specify the version number manually.

However, there are a couple of downsides to manually setting the version in source control. It becomes important to increment the number on every commit, as each build would otherwise produce a package with the same version. Which in turn means that a consumer of the package will never get a new version, as the local NuGet cache will not update the package binary on their system. The same applies with our CDN, which has similar caching mechanics.

Did this answer your question?