We are currently in the process of migrating our components to the new Designer.
After having the project on hold for some time, I've noticed, that the PackageVersion did not change. Reason being the Format String:
|
<PackageVersion>$([System.DateTime]::Now.ToString("1.yM.dHmm"))</PackageVersion> |
> new DateTime(2025, 2, 5).ToString("1.yM.dHmm")
"1.252.5000"
> new DateTime(2024, 12, 23).ToString("1.yM.dHmm")
"1.2412.23000"
This results in the Version from December being considered "newer" by NuGet because 2412 > 252.
A better Format String might be 1.yyyyMM.1ddHHmm (or may be 2.yyyyMM.1ddHHmm, because the format changed? )
- made year component always four-digit and month, day, hour components always two-digit
- added a const '1' so 0-padded dates dont get truncated
> new DateTime(2025, 12, 23).ToString("1.yyyyMM.1ddHHmm")
"1.202512.1230000"