开发者

How to get the build time in .NET?

Is it possible开发者_JAVA百科 for a .NET assembly to know when it was built?


Here is an interesting article, which explains three ways to find the build date of an assembly :

Determining Build Date the hard way


Assembly metadata does not contain a build date. You could do a couple of things though:

  1. Use the filesystem's modified date to check when it was built.
  2. Encode the date into the assembly version.


If you use http://autobuildversion.codeplex.com/

It has an option to add a number of date combinations to any of the Assembly(File) Version. And it will update this on every build.

I usually have something like year + day of year as my revision numbers.

Like 1 Jan 2011 would be : 11001

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜