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

推荐订阅源

WordPress大学
WordPress大学
T
Threat Research - Cisco Blogs
美团技术团队
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
Engineering at Meta
Engineering at Meta
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
The Register - Security
The Register - Security
Cyberwarzone
Cyberwarzone
F
Fortinet All Blogs
L
LINUX DO - 热门话题
C
Check Point Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
S
Security Affairs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Webroot Blog
Webroot Blog
V2EX - 技术
V2EX - 技术
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Martin Fowler
Martin Fowler
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
I
InfoQ
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
L
Lohrmann on Cybersecurity
T
Threatpost
腾讯CDC
Security Latest
Security Latest
K
Kaspersky official blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Stack Overflow Blog
Stack Overflow Blog
Help Net Security
Help Net Security
Forbes - Security
Forbes - Security

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