Dynamically display current year in assembly info

前端 未结 5 2092
轻奢々
轻奢々 2021-02-13 07:32

How to set current year in AssemblyInfo file?

I used

Instead of this:

 
         


        
5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 08:02

    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.

提交回复
热议问题