How do I find the current time and date at compilation time in .net/C# application?

前端 未结 7 2190
孤城傲影
孤城傲影 2020-12-06 12:43

I want to include the current time and date in a .net application so I can include it in the start up log to show the user what version they have. Is it possible to retrieve

7条回答
  •  醉话见心
    2020-12-06 13:10

    You could use PostSharp to weave in the date immediately post-build. PostSharp comes with a lightweight aspect-oriented programming library, but it can be extended to weave in anything you need in a wide variety of ways. It works at the IL level, but the API abstracts you a bit from that.

    http://www.postsharp.org/

提交回复
热议问题