visual studio - Version is never updated, when building a NuGet package in VSTS -


i started create own nuget packages , today wanted set build on vsts, automatically generates nuget package out of vs-project , pushes vsts-feed. after while successful building project , pushing feed. continuous integration wanted add version number, write in assemblyinfo file. lead me problem have now:

i can see number being changed in log of build , when download , integrate locally vs, version right.

but not on feed. feed totally ignores number. version number seems 1.0.0 somehow, , never changes. after building again, error message, because:

the feed contains 'samplenugetpackage 1.0.0'

i hope information , these screenshots enough understand problem :)

to touble shooting issue, please check below aspects:

1. check if change assmbly version correctly in assemblyinfo.cs file

assume need changes assembly version 1.0.0.0 1.0.1.0, should change below lines in assemblyinfo.cs:

[assembly: assemblyversion("1.0.1.0")] [assembly: assemblyfileversion("1.0.1.0")] 

note: assembly version format major.minor.build.revision, , first 3 numbers can reflected in package version. need change first 3 numbers.

2. check if generated variable’s name assemblyinfo.assemblyversion

add powershell task after assembly info reader task list variables. settings powershell task below:

type: inline script

inline script: get-childitem env:

assume have changed version in in assemblyinfo.cs 1.0.1.0, queue build. in build log of powershell task, find variable name start assemblyinfo_ , value 1.0.1.0. if there has variable named assemblyinfo_assemblyversion , value 1.0.1.0, means used environment assemblyinfo.assemblyversion correct in nuget pack task. else should use correct variable name value 1.0.1.0.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -