Updating the assembly version

This command looks at the whole project/solution and looks at all assembly references.

updating the assembly version-37updating the assembly version-35

It’s just a number that consists of the current date and a revision number: $(date:yyyy MMdd)$(rev:.r) If you have many build this is not very helpful.This can also be done in build v Next using a small power shell script.I also added the option to apply the version to Share Point / Office 365 apps.What you can do is to add variables that you define on the variable tab – like major and minor version.You can then use the variables in the name of the build.Here is an example that consists of the build definition name, a major and minor version that are configured via build variables and a revision number that is build from the year and “dayofyear” to ensure a valid sorting of the builds: $(Build Definition Name)_$(Major Version).$(Minor Version).$(Year:yy)$(Day Of Year)$(rev:.rr) You can then use a Power Shell script Set-Assembly Version.ps1 in a VNext build to set all assembly versions – and optionally the version of Share Point / O365 Apps – to a build number that is extracted from the build name using a regular expression.[Cmdlet Binding(Supports Should Process=$true, Confirm Impact='Medium')] [Alias()] [Output Type([int])] Param ( # The path to the source directory.Thanks to @maartenballiauw and @tsimbalar who pointed out this command to me when I was griping on Twitter about mismatched assemblies after an update to the latest ASP.NET Web API and MVC packages in a couple of projects.If you specify * in Build number part and specify number for Revision then compiler will provide error for the same.For Assembly Information Version attribute considers all value as string so all the above samples are allowed (testing in VS2012).

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating the assembly version”