# AssemblyInfo Updater does not update default AssemblyInfo.cpp properly

**URL:** https://www.finalbuilder.com/forums/t/assemblyinfo-updater-does-not-update-default-assemblyinfo-cpp-properly/3147
**Category:** Bugs
**Created:** [September 5, 2009, 2:10am UTC](https://www.finalbuilder.com/forums/t/assemblyinfo-updater-does-not-update-default-assemblyinfo-cpp-properly/3147 "2009-09-05T02:10:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [September 5, 2009, 2:10am UTC](https://www.finalbuilder.com/forums/t/assemblyinfo-updater-does-not-update-default-assemblyinfo-cpp-properly/3147/1 "2009-09-05T02:10:43Z")

</div>

I&nbsp;had my AssemblyInfo updater setup to update both CS and CPP&nbsp;AssemblyInfo files.&nbsp; I&nbsp;notice that I&nbsp;have my AssemblyProduct attribute set for the CS&nbsp;files and it seems to try and convert that to AssemblyProductAttribute when updating CPP&nbsp;files (a nice feature).&nbsp; On a CPP, when I&nbsp;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.&nbsp; Running this twice just appends another one.&nbsp; The attached sample demonstrates proper updating of the CS&nbsp;file and strange appending behavior on the CPP.

Thanks,

-Nelson

&nbsp;

&nbsp;

[002\_001\_AssemblyInfoBug.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/9/98d1a6831d5ad78e5bae10336635903cff7f591d.zip) (5.306 KB)

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 5, 2009, 10:51am UTC](https://www.finalbuilder.com/forums/t/assemblyinfo-updater-does-not-update-default-assemblyinfo-cpp-properly/3147/2 "2009-09-05T10:51:07Z")

</div>

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 :&nbsp;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&nbsp;files as the attribute names are different.

&nbsp;

---

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [September 5, 2009, 11:06am UTC](https://www.finalbuilder.com/forums/t/assemblyinfo-updater-does-not-update-default-assemblyinfo-cpp-properly/3147/3 "2009-09-05T11:06:24Z")

</div>

Ah! Thanks Vincent!
