-
Notifications
You must be signed in to change notification settings - Fork 1.9k
address build version issue and enhance logging #5268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5268 +/- ##
==========================================
+ Coverage 73.56% 73.64% +0.08%
==========================================
Files 1022 1022
Lines 189690 189690
Branches 20441 20441
==========================================
+ Hits 139539 139698 +159
+ Misses 44611 44473 -138
+ Partials 5540 5519 -21
|
@@ -66,6 +66,8 @@ | |||
<!-- Version properties --> | |||
<PropertyGroup> | |||
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix> | |||
<BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor> | |||
<BuildNumberMinor Condition="'$(BuildNumberMinor)' == ''">0</BuildNumberMinor> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious. Is there a restriction on the format for BuildNumberMajor that it has to have the four leading zeros? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BuildNumberMajor is 5 digit number like 29008 so set default BuildNumberMajor as 00001
In reply to: 447871778 [](ancestors = 447871778)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of issue #5266
This issue looks like a bug in msbuild versioning. This only happens when the build is crossing 2 days as msbuild versioning is generating versioning file each day so when some project starts to build when the system time is crossing to new day, seems msbuild versioning can't handle this case and read empty BuildNumberMajor and BuildNumberMinor sometimes which cause the assembly version number to be a invalid format.
I can repro this issue by set system time to a time very close to midnight, say 11:58 PM then start build from cmd, there is pretty good chance to repro the build version issue. Since we don't have a way to upgrade build tools now I will use default value of BuildNumberMajor and BuildNumberMinor to mitigate this issue.