views:

105

answers:

2

I have an assembly that is already built, but I need to modify it's version number. Is there a way to do this without recompiling?

+2  A: 

According to this answer you can.

David Basarab
+1  A: 

The assembly version number is held in more than one place. The one that's reported with the assembly's strong name is in the Assembly metadata table (ECMA-335 §22.2). However, the one associated with the AssemblyVersionAttribute that you can access through code is located as a parameterized constructor argument in the "blob" data section (ECMA-335 §23.3). Since the number in both locations is a fixed number of bytes, you could change it without recompiling. However you would break the signature if you are signing the assemblies, so this action would need to be performed before signing the assembly.

280Z28