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

推荐订阅源

有赞技术团队
有赞技术团队
MyScale Blog
MyScale Blog
Cyberwarzone
Cyberwarzone
Schneier on Security
Schneier on Security
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
Cloudbric
Cloudbric
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
NISL@THU
NISL@THU
博客园 - Franky
F
Fortinet All Blogs
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
T
Troy Hunt's Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
美团技术团队
D
Docker
PCI Perspectives
PCI Perspectives
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 最新话题
Recent Announcements
Recent Announcements
Hacker News: Ask HN
Hacker News: Ask HN
人人都是产品经理
人人都是产品经理
月光博客
月光博客
D
DataBreaches.Net
The Hacker News
The Hacker News
爱范儿
爱范儿
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
SecWiki News
SecWiki News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
A
About on SuperTechFans
Latest news
Latest news
GbyAI
GbyAI
T
Tor Project blog
L
LINUX DO - 热门话题
Security Latest
Security Latest
博客园 - 聂微东
Y
Y Combinator Blog
AI
AI
M
MIT News - Artificial intelligence

博客园 - 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 的特性?