Updating the version number of all assemblies in a solution

PaulB picture PaulB · Apr 17, 2009 · Viewed 10.7k times · Source

I've got a rather large solution in Visual Studio. Is there a way to update the Major / Minor version numbers for all the assemblies in the solution in one go?

Answer

grover picture grover · Apr 17, 2009

You can share an AssemblyInfo.cs file between all projects in the solution. This shared file should contain the version numbers. To share it, you must use Add Existing File in VS and select Add as Link in the file dialog. Every project has its private and the shared AssemblyInfo.cs. The private one still contains the non-Version attributes.

I've got a TeamCity setup, where I'm generating the shared file in each TeamCity build using the actual build version and it works beautifully.