Updating the version number of all assemblies in a solution

前端 未结 6 1940
清歌不尽
清歌不尽 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:06

    You can also have a public const string in one of your classes, that represents the build number, and use it in all your AssemblyInfo.cs for the different projects. Of course this would have to be in a project that are referenced by all the other projects, in order to work.

    It is a good option, if you don't like the idea to reference the same AssemblyInfo.cs in all your projects.

    Edit: Note! This also works when you use multiple languages (F# and C# in my case).

提交回复
热议问题