Built-in date version of .net 3.5 wpf application.

I want to show Build On date in the "About Message" field, I am currently using File.LastWriteTime (Assembly.GetEntryAssembly (). Location).

// But the problem is with this approach. Build time is the time I installed my application.

eg. on 1st yang, I created the assembly and then ran .exe on the 7th jan to install it. Build on a date comes the 7th jan not 1stJan.

Any ideas?

+3
source share
1 answer

You can create your own AssemblyBuildTimestampAttributeand use it in the same way as it is used AssemblyVersionAttributeso that you can mark your assemblies with a version as well as a timestamp.

, , , AssemblyVersion("1.2.*"). , . , - , 1 2000 , .

+1

Source: https://habr.com/ru/post/1783846/


All Articles