chore: support local NuGet source via NOSCORE_LOCAL_PACKAGES env var#3
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
WalkthroughThe pull request modifies NuGet package source configuration. A new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Putting the local source in NuGet.config as %NOSCORE_LOCAL_PACKAGES% fails NU1301 on restore when the env var is unset (CI runners, fresh clones) because NuGet treats the literal %VAR% as a path. Move the wiring to Directory.Build.props with a Condition that only adds RestoreAdditionalProjectSources when the env var is set. Devs who want local packages just set NOSCORE_LOCAL_PACKAGES; everyone else is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c6e723d to
064cfeb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Directory.Build.propswith a conditionalRestoreAdditionalProjectSourcesthat activates only whenNOSCORE_LOCAL_PACKAGESis set.setx NOSCORE_LOCAL_PACKAGES C:\LocalPackages, restart shell/VS, drop .nupkg files into the folder. Replaces the earlierNuGet.config-based attempt, which broke restore (NU1301) whenever the env var was unset.Test plan
dotnet restoresucceeds withNOSCORE_LOCAL_PACKAGESunset.dotnet restorewithNOSCORE_LOCAL_PACKAGESpointing to a folder with a .nupkg picks it up.Generated with Claude Code