Skip to content

Commit 124f59c

Browse files
erwan-jolyclaude
andauthored
chore: support local NuGet source via NOSCORE_LOCAL_PACKAGES env var (#737)
Move the wiring out of NuGet.config (where %NOSCORE_LOCAL_PACKAGES% fails NU1301 when unset) into a conditional Directory.Build.props PropertyGroup. RestoreAdditionalProjectSources is only set when the env var is defined, so CI and fresh clones are unaffected. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 42126dd commit 124f59c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup Condition="'$(NOSCORE_LOCAL_PACKAGES)' != ''">
3+
<RestoreAdditionalProjectSources>$(RestoreAdditionalProjectSources);$(NOSCORE_LOCAL_PACKAGES)</RestoreAdditionalProjectSources>
4+
</PropertyGroup>
5+
</Project>

NuGet.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="local" value="%NOSCORE_LOCAL_PACKAGES%" />
54
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
65
</packageSources>
7-
</configuration>
6+
</configuration>

0 commit comments

Comments
 (0)