SVN Revision Version in .NET Assembly w/ out CC.NET

前端 未结 8 1134
失恋的感觉
失恋的感觉 2020-12-23 11:55

Is there any way to include the SVN repository revision number in the version string of a .NET assembly? Something like Major.Minor.SVNRev

I\'ve seen mention of doi

相关标签:
8条回答
  • 2020-12-23 12:55

    If you want to update the version number in a projects AssemblyInfo.cs you may be interested in this article:

    CodeProject: Use Subversion Revision numbers in your Visual Studio Projects

    If you enable SVN Keywords then every time you check in the project Subversion scans your files for certain "keywords" and replaces the keywords with some information.

    For example, At the top of my source files I would create a header contain the following keywords:

    '$Author:$
    '$Id:$
    '$Rev:$

    When I check this file into Subversion these keywords are replaced with the following:

    '$Author: paulbetteridge $
    '$Id: myfile.vb 145 2008-07-16 15:24:29Z paulbetteridge $
    '$Rev: 145 $

    0 讨论(0)
  • 2020-12-23 12:55

    You can use a shared Assembly Version file that you can reference in all of your projects.

    UppercuT does this - http://ferventcoder.com/archive/2009/05/21/uppercut---automated-builds---versionbuilder.aspx

    This will give you an idea of what you can do to get versions in your assemblies.

    0 讨论(0)
提交回复
热议问题