Dynamically display current year in assembly info

前端 未结 5 795
天命终不由人
天命终不由人 2021-02-13 07:05

How to set current year in AssemblyInfo file?

I used

Instead of this:

 
         


        
5条回答
  •  执笔经年
    2021-02-13 08:07

    I had similar question, but for new style csproj file; that contains the file version info. I found a great answer here How to define current system date in post build event. Oddly, that is about a question that is somewhat different than my and the OP question. But, I think the accepted answer to that is what I want. Namely, $([System.DateTime]::Now.Year) in the csproj files evaluates to the current year.

提交回复
热议问题