Incremental build in TFS - How do I update AssemblyInfo.cs version only for projects that have changed? -


we have solution in tfs 2012 contains several projects. have set continuous integration build on our build server , have set clean workspace = none. i'm using tfs versioning template 2.0 update assemblyfileversion , assemblyversions.

when build run, each project has assemblyinfo.cs file updated new version number though there have been no changes made code in of projects. ideally want version change if there have been changes project.

i considering building each project separately, prefer able build solution. have read clean workspace = none should prevent projects being updated doesn't appear happening me since timestamp on dll's showing changed after build.

i new setting build process, i'm hoping there simple i'm doing wrong. suggestions appreciated.

update: after checking suggested link, appears i'm doing 2 things during build may causing issue: 1) web.config file transforms take place in "afterbuild" step in 1 of projects , 2) using version number increment features in "tfs versioning" template without opening workflow see how checking changed files. i'll remove both of these , see happens.

this question , possible. run powershell scripts use tfs api determine files have changed

you need changesets , shelvesets also, once have these can information want this:

function get-changesetchanges() {     [cmdletbinding()]     param ([parameter(mandatory=$true)][string]$changeset,[parameter(mandatory=$true)][string]$tfsserver) [void][reflection.assembly]::loadwithpartialname('microsoft.teamfoundation.versioncontrol.client') [void][reflection.assembly]::loadwithpartialname('microsoft.teamfoundation.client') $tfs = [microsoft.teamfoundation.client.teamfoundationserverfactory]::getserver($tfsserver)  $vcs = $tfs.getservice([microsoft.teamfoundation.versioncontrol.client.versioncontrolserver])   $vcschanges = $vcs.getchangeset($changeset).changes; $changes = @();  foreach ($change in $vcschanges) {        $changes += $change.item.serveritem; }  $changes; 

}


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -