Set AssemblyInfo Version numbers with MSI setup version

后端 未结 2 959
孤街浪徒
孤街浪徒 2020-12-03 03:47

I am using a setup project to publish my projects. I want the version of each project to be the same as the setup version.

I want to change my setup version

2条回答
  •  一向
    一向 (楼主)
    2020-12-03 04:19

    I don't know if this solves your problem perfectly but you could implement a common class with all the configmanagment informations like:

    public class VersionInfo{
        public const string cProductVersion = "1.0.0"
        //other version info
    }
    

    After you can update all your AssemblyInfo.cs with the new class:

    [assembly: AssemblyVersion(VersionInfo.cProductVersion)]
    

    I hope this helps.

提交回复
热议问题