My problem isn't just having to do this across multiple files, but it is also that the complexity of what I need to find is quite tricky. After upgrading the .NET version of my application, some parts of some resource files have been duplicated, for everything except the assembly version number which has been incremented.
Here is an example resource file, which should demonstrate my problem:
<data attribute="value" > <value>Version="dot_net_4_assembly_version_number", <!--This element is fine--></value> </data> <data attribute="anotherValue" > <value>Version="dot_net_2_assembly_version_number", "identical_data_here"</value> </data> <data attribute="anotherValue" > <value>Version="dot_net_4_assembly_version_number", "identical_data_here"</value> </data>
So what I would need is some sort of tool, or some command script or something(if this is even possible) which will search through each file, and identify wherenall values in xml elements are the same, except the
Version=... numbers match the .NET 2 and 4 versions, and then remove the .NET 2 version of the xml element.
How to achieve this? Would some sort of bash-command script be needed to do this? (Also, hopefully I am asking this question in the right place, let me know if I am not)