Is there any way to generate some unique identifier for each compilation / build which I can use as constant in other places of application other than build number?
Asked
Active
Viewed 255 times
1
-
4Why do you need this? Just asking! – Prashant Pimpale Dec 23 '18 at 06:24
-
2Some thought: You can write a pre-build action to update some custom attribute (like those attributes in AssemblyInfo.cs), using the Ticks value of the current time stamp. – kennyzx Dec 23 '18 at 07:02
-
Why do you not want to use the build number? The parts of the build number can be set to be some kind of timestamp, which will be unique for you as long as you don't compile two builds at the same time. See https://stackoverflow.com/questions/826777/how-to-have-an-auto-incrementing-version-number-visual-studio – Progman Dec 23 '18 at 09:27
-
1Basically we wanted to generate some id which we will later append with cookie names so that web applications can reside on single IP with different ports, where the applications share same custom authentication and authorization library. – Tushar Dec 27 '18 at 10:28
-
Darn, I need this, too, for a C# scheduler I'm building called Didact. – Daniel Miradakis Jun 03 '23 at 19:17