惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Martin Fowler
Martin Fowler
The Cloudflare Blog
The Register - Security
The Register - Security
WordPress大学
WordPress大学
量子位
Vercel News
Vercel News
C
Check Point Blog
V
Visual Studio Blog
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
PCI Perspectives
PCI Perspectives
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Schneier on Security
Schneier on Security
O
OpenAI News
M
MIT News - Artificial intelligence
S
Secure Thoughts
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security Affairs
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
L
LINUX DO - 最新话题
The Last Watchdog
The Last Watchdog
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
V
V2EX
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志

博客园 - NetCobra

近况 让TortoiseSVN使用类似TortoiseCVS的文件冲突解决方式 CSDN双雄——universee(太极语言)和Sinox(汉澳操作系统) The Netron project down, Netron Reloaded... 推荐一个开源项目和一个免费工具 Windows平台下使用Active Directory对Subversion进行权限控制(非完美解决方案) DotNet 项目中链接文件的用处 看看美国的烂公司是怎么样的烂法 SQLite 不能加密? 对软件的多语言化方法的一点看法 最近工作情况 关于 zjsflyer 对 JPgraph 中文显示乱码问题的回复 [旧文]来自 Borcon2003 中国开发者大会的现场报道 每日构建中的两个问题 如何防止 Wiki 被恶意篡改? [翻译] NMock 两分钟教程 [翻译] NMock 简介 头疼的问题:NAnt 的 cvs-checkout 任务无法执行 可以下载 Delphi 2005 试用版了
[问题]DotNet 项目如何实现在构建时 Build 号自动增加?
NetCobra · 2004-11-30 · via 博客园 - NetCobra

继续昨天的问题,今天在Google上找了一下,没有找到很好的方案。

目前找到的解决方案有以下几种:
1.使用一个地三方的 VS.Net 插件,实现在编译时 Build 号自动增加,文章是在 CSDN 上找到的,但是我在 GotDotNet 上没有找到这个插件;
2.使用 VS.Net 的宏,实现在编译时 Build 号自动增加;来源:http://blogs.biasecurities.com/jim/archive/2003/10/08/166.aspx

以上两种方法都要求在 VS.Net 的 IDE 中进行编译,无法用于 NAnt 的自动构建;

3.在 AssemblyInfo.cs 文件中设置[assembly: AssemblyVersion("1.0.*")],编译时“*”会被默认值(???不知道什么默认值,微软文档中说“星号 (*) 表示接受默认的内部版本号、修订号”)代替;
如果这种方法能够成功,那么应该是最理想的;但是这个方法在我这里失败,我试验的时候(非IDE,NAnt脚本构建),这个“*”的确会变,但是变化的毫无规律,上一次 Build 后文件的版本是1.0.1795.37140,再 Build 一次,版本号就变成了 1.0.1795.37192 了,再来一次,版本号是1.0.1795.38763,不知道是怎么变化的。

来源:http://www.devhood.com/messages/message_view-2.aspx?thread_id=99499http://dotnet247.com/247reference/msgs/50/250896.aspx

最不愿意采用的方法就是自己写一个程序,每次编译时读取AssemblyIfo.cs中的VersionNo,自动增加后回写。

总觉得 MS 在设计的时候应该考虑到了这个问题的吧?或许是一个 Unleased 的特性?