Support ability to pull version number from AssemblyVersionAttribute
Quoting @mayerwin from #10:
The standard usage with nuget pack *.csproj is to use the assembly's version number as the NuGet package version number. People trying to switch to NuGet.Packer may be surprised of this change in behavior. But it is still a good option to have to generate an incremental build number for those who would want it and not change the real build version number. So what could make all this work and get closer to what VS is already able to do would be to:
Use the assembly's build number by default, and improve the documentation to mention the possibility to make incremental build numbers automatically by simply changing the assembly version to take advantage of the * token. Include an option to automatically generate a time-based NuGet-specific build number (at least with minute precision, with clear documentation), though IMHO it would be better to also reflect this in the real build number, so this option may be deprecated in favor of the built-in way of achieving the same. Continue offering the possibility to pass a version number passed externally (I am personally not in this configuration).
My short answer for why this is not currently supported: it'd be complex to do and/or require more than what MSBuild has to offer natively. While I'm not necessarily against complexity (as long as it is hidden from consumers), I am very against adding dependencies unless they are absolutely needed.
And, frankly, I've had nothing but nightmares allowing VS/MSbuild to determine what version "1.0.*" is going to end up being, especially keeping that number adhering to semver across multiple machines.
The current implementation is meant to be used with some other mechanism determining/managing the build number externally, with a sane fallback of the current time which offers some semblance of adherence to semver.
All that said, I'm certainly not against the idea of pulling it from the assembly info as the default behavior when no external build version is passed in. Then it's just a matter of doing it, in the simplest way possible.