AssemblyInfo Updater does not update default AssemblyInfo.cpp properly

I had my AssemblyInfo updater setup to update both CS and CPP AssemblyInfo files.  I notice that I have my AssemblyProduct attribute set for the CS files and it seems to try and convert that to AssemblyProductAttribute when updating CPP files (a nice feature).  On a CPP, when I have set the action to update the AssemblyProduct attribute it appends a AssemblyProductAttribute to the bottom of the file instead of updating the one that exists at the top.  Running this twice just appends another one.  The attached sample demonstrates proper updating of the CS file and strange appending behavior on the CPP.

Thanks,

-Nelson

 

 

002_001_AssemblyInfoBug.zip (5.306 KB)

Hi Nelson

As far as I can see, this is part bug and part user error

There is a bug in that the parser is always adding Attribute to the end of the attribute name when adding an attribute, so AssemblyProduct becomes AssemblyProductAttribute. The user error is that you are specifying to update the AssemblyProduct but in a typical AssemblyInfo.cpp the attribute is usually called AssemblyProductAttribute. The assembly info updater action doesn't have any knowledge of specific attributes, it's just a parser, so it will do just what you ask of it.

I just fixed the bug with the adding Attribute to the attribute names for cpp files :

https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1697.exe

Edit : Forgot to say thanks for a detailed sample project which made it easy to see the problem. When I run that project now behaves as I would expect. What you will need to do is add separate actions for C# and CPP files as the attribute names are different.

 

Ah! Thanks Vincent!