-
Notifications
You must be signed in to change notification settings - Fork 2
Remove --no-restore from build step in publish workflow #171
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
The build step in the publish workflow no longer uses the --no-restore flag, ensuring that dependencies are restored during the build process.
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.
Pull request overview
This PR removes the --no-restore flag from the build step in the publish workflow, which causes dependencies to be restored twice: once explicitly at line 50 and again implicitly during the build at line 53.
Changes:
- Modified the build command to remove
--no-restoreflag, allowing the build step to perform its own dependency restoration
|
|
||
| - name: Build solution | ||
| run: dotnet build --configuration Release --no-restore | ||
| run: dotnet build --configuration Release |
Copilot
AI
Jan 21, 2026
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.
Removing the --no-restore flag causes redundant dependency restoration. Since dependencies are explicitly restored at line 50 with dotnet restore, the build step should use --no-restore to avoid restoring dependencies again. This improves build performance by skipping unnecessary work.
The recommended pattern is:
- Explicit
dotnet restore(line 50) dotnet build --no-restore(to skip redundant restore)dotnet test --no-build(to use build artifacts)
This change makes the build slower without providing any benefit.
| run: dotnet build --configuration Release | |
| run: dotnet build --configuration Release --no-restore |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
=======================================
Coverage 97.88% 97.88%
=======================================
Files 114 114
Lines 2365 2365
Branches 267 267
=======================================
Hits 2315 2315
Misses 30 30
Partials 20 20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The build step in the publish workflow no longer uses the --no-restore flag, ensuring that dependencies are restored during the build process.