As your solution grows, the number of assemblies you have will undoubtedly grow too. Updating the version numbers of all those assemblies by their projects AssemblyInfo.cs files can be a hassle. However, there is a way to change the version in just one file, but have that change affect all project assemblies!
By using a “link” file in your projects, you can include a file from a shared location that contains only the version information.
- Add a new file named VersionInfo.cs
- Add to this file only the version information from an existing AssemblyInfo.cs file
- Add VersionInfo.cs as a solution item
Now, for each project that you wish to include this version information:
When then assembly is built it will essentially have the combined attribute values from the AssemblyInfo.cs and VersionInfo.cs file.
Now you only have to change the version in one place and all projects will get it