不含CC.NET的.NET程序集中的SVN修订版 [英] SVN Revision Version in .NET Assembly w/ out CC.NET

查看:65
本文介绍了不含CC.NET的.NET程序集中的SVN修订版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在.NET程序集的版本字符串中包含SVN存储库修订号?类似Major.Minor.SVNRev

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

我已经提到过使用CC.NET之类的方法(尽管实际上在ASP.NET上),但是有什么办法不用任何额外的软件就可以做到吗?在使用构建批处理脚本之前,我已经在C / C ++中做过类似的事情,但是通过读取版本号,然后让脚本每次都写出一个名为 ver.h的文件来实现,效果如下: p>

I've seen mention of doing this with something like CC.NET (although on ASP.NET actually), but is there any way to do it without any extra software? I've done similar things in C/C++ before using build batch scripts, but in was accomplished by reading the version number, then having the script write out a file called "ver.h" everytime with something to the effect of:

#define MAJORVER 4
#define MINORVER 23
#define SOURCEVER 965

然后我们将使用这些定义来生成版本字符串。

We would then use these defines to generate the version string.

是什么

推荐答案

看看SubWCRev- http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html

Have a look at SubWCRev - http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html

程序集版本号通常在assemblyinfo.cs中

The assembly version numbers are usually in assemblyinfo.cs

这篇关于不含CC.NET的.NET程序集中的SVN修订版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆