Fix CS7035 warning in dependabot jobs#2849
Conversation
Fix `CS7035` warnings from `$GITHUB_RUN_NUMBER` not being set when dependabot jobs run.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2849 +/- ##
=======================================
Coverage 96.15% 96.15%
=======================================
Files 309 309
Lines 7127 7127
Branches 1005 1005
=======================================
Hits 6853 6853
Misses 221 221
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR addresses CS7035 warnings that occur during dependabot jobs when the GITHUB_RUN_NUMBER environment variable is not set. The fix wraps the variable reference with MSBuild's ValueOrDefault function to provide a fallback value of '0'.
- Wraps
GITHUB_RUN_NUMBERwithValueOrDefault('$(GITHUB_RUN_NUMBER)', '0')in the FileVersion property to prevent build warnings when the environment variable is not available
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix another instance that needed updating.
Fix
CS7035warnings from$GITHUB_RUN_NUMBERnot being set when dependabot jobs run.