Updating the version number of all assemblies in a solution

前端 未结 6 1941
清歌不尽
清歌不尽 2020-12-08 03:00

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?

6条回答
  •  情书的邮戳
    2020-12-08 03:15

    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.

提交回复
热议问题