AssemblyInfo Updater Does not work for multiple files

Hi,

When setting up the AssemblyInfo Updater action, If I’ve defined multiple lines for multiple files to update (One file per line), but it only updates the first item.

After running the build with the below configuration, only the first file in the list was updated, the log only displays 3 lines, one for each of the properties updated in the single file.



Regards,
Sean

Hi Sean

I have not been able to reproduce this here. If you change the order of the files does that change which file is updated? I’m wondering if some error is occuring that is being masked some how and causing the rest of the files not to be processed?

What version/build of Continua CI are you using?

Hi Vincent,

  • I’m using 1.8.0.230
  • Changing the order does not fix the issue but the build logs change to show that the assembly that is now first in the list is updated
  • I’ve turned off cleanup so I can inspect the files after the build, I can see by inspecting the AssemblyInfo.cs file for each of the projects in the list that only the first has been updated
  • If I add individual actions for each of the file paths, it works just fine. I did this to eliminate an incorrect path as the cause.

Regards,
Sean

 

Hi Sean

I’m going to add more logging to the action so we can try and identify what is causing the problem here. We’ll upload a new build with the extra logging later today.

No worries, I’ll wait to hear from you.

Cheers,
Sean

How’d you go with this? Is this fixed in v1.8.0.243?

Hi Sean,

v1.8.0.243 includes a verbose logging option on this action. If you can install this, enable the option and then run your build again, then the build log should provide us with more details.

Thanks Dave,

I’ve sent an email through with the log output for this action.

Regards,
Sean

Dave,

I can confirm that the issue is resolved in 1.8.0.248.

Thanks again for your help.

Cheers,
Sean

Hi Sean,

I am experiencing the exact same issue in Continua Version: 1.8.1.325.
I have two AssemblyInfo updater steps one with 87 files in separate lines and the other with 61 file paths in seperate lines.
For 21 AssemblyInfo files the AssemblyVersion propterty is not being updated. The verbose logging for these 21 files shows:


[code]AssemblyInfo Updater FS Perfomance (1/2)Expanding propertiesExpanding file patternsFound 87 matching files.Updating filesUpdating file: D:\CI_AWS\Ws\30183\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.csReading file: D:\CI_AWS\Ws\30183\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs Replacing file content: D:\CI_AWS\Ws\30183\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.csUpdated property ‘AssemblyTitle’ to ‘“FS Performance”’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Updated property ‘AssemblyDescription’ to ‘""’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Updated property ‘AssemblyCompany’ to ‘“Priva B.V.”’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Updated property ‘AssemblyCopyright’ to ‘“Copyright © Priva B.V. 2007-2017”’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Updated property ‘AssemblyProduct’ to ‘“FS Performance”’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Property ‘AssemblyVersion’ exists but wasn’t updated to ‘“2.12.0.20”’ in file '$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’Updated property ‘AssemblyFileVersion’ to ‘“2.12.0.20”’ in file ‘$Workspace$\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs’ Writing file: D:\CI_AWS\Ws\30183\Source\Fusion\Componenten\Master Data\Master Data Service\MasterDataService\Properties\AssemblyInfo.cs[/code]

What could be the reason for not updating the ‘AssemblyVersion’ when it is clearly finding it in the files?

PS. I changed the order of the AssemblyInfo paths in the steps but the same files keep failing to update the AssemblyVersion propterty

Regards,

Erwin van der Stelt

Hi Erwin,

It’s not quite the same issue. This message is shown when the property to be updated is within a comment. We’ll need to change the message to make this clearer. If this is not the case and the property is not commented out, then maybe our code is detecting comments incorrectly. Please send the AssemblyInfo file to support@finalbuilder.com so we can investigate the issue further.

Hi Dave,

I send you an email with the file and action configuration I am using.

Note that I managed to work around the issue by adding a separate AssemblyInfo Updater action which only updates the one property (AssemblyVersion:"$Build.Version$") that fails on the failing AssemblyInfo files. To my surprise this works as it should and replaces the property value normally.

It should however not be necessary to do that.