How to update the Value in Assemblyinfo.cs dynamically

后端 未结 3 1409
情歌与酒
情歌与酒 2021-01-02 22:48

I have writen a program which gets the value from SVN repository . Now I want to update the AssemblyFileversion with that value.

As I am not able to write any code i

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 23:22

    You'll need to do this during your build process.

    Since you're using Visual Studio, you're already using MSBuild, in which case the MSBuild Extension Pack has an AssemblyInfo task.

    For getting the revision from Subversion, the MSBuild Extension Pack has got a task for that as well.

    Alternatively, if you're using TeamCity for continuous integration (CI), it has an "AssemblyInfo patcher" build feature. I guess that most other CI systems will have something similar.

提交回复
热议问题