I am trying to configure CI deployment for my NuGet package on VSTS so that when a new commit is made, the package will be packaged and sent to my channel. Unfortunately, I'm not sure where to start. most of my experience working with versions manually updated the file that is inside the solution, so this is the question, so if there is a better way to do this, let me know.
I would like the name to be the version number in the AssemblyInfo.cs file ("0.0.1") with the build number of the added automatic assembly. Thus, the final result will look something like "0.0.1.35". I would also like to avoid using date and time in my naming; There are many suggestions to use this, but I really want the version number to be clean so that I can free the packages.
I use the "NuGet pack" task, so I only have the options "Use date-time", "Use environment variable" or "Use build number".
Date / time means that I need to manually enter the main, minor and patch, which I would prefer to be automatic.
The environment variable sounds like this, maybe, but I think that I am missing what I have to put in this field.
- I set my assembly name as "$ (BuildDefinitionName) _ $ (Year: yyyy). $ (Month). $ (DayOfMonth) $ (Rev: .r)", but without getting the result, I was hoping.
Any help would be greatly appreciated!
source
share