-
Hi, Not sure this is a bug or not, but I have this nuget.config at the root of a repo: <?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="github" value="https://nuget.pkg.github.com/NcuGit/index.json" protocolVersion="3" />
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="ncuget" value="\\iotfs12vs01\Packages" />
</packageSources>
<packageSourceCredentials>
<github>
<add key="Username" value="%GH_PKG_USER%" />
<add key="ClearTextPassword" value="%GH_PKG_TOKEN%" />
</github>
</packageSourceCredentials>
<disabledPackageSources>
<add key="ncuget" value="false"/>
</disabledPackageSources>
</configuration> But this seems to disable the source "ncuget" despite the value being "false". The actual intent was to do this: <?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="github" value="https://nuget.pkg.github.com/NcuGit/index.json" protocolVersion="3" />
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="ncuget" value="\\iotfs12vs01\Packages" />
</packageSources>
<packageSourceCredentials>
<github>
<add key="Username" value="%GH_PKG_USER%" />
<add key="ClearTextPassword" value="%GH_PKG_TOKEN%" />
</github>
</packageSourceCredentials>
<disabledPackageSources>
<add key="ncuget" value="%NCUGET_DISABLED%"/>
</disabledPackageSources>
</configuration> so that developers could set this envar on their machine to "false" but in Github workflows we'd set it to "true". We want devs who are working on their PCs to be able to see the source (its on a private network share) to explore it etc but because it is inaccessible within Github we wanted to disable it otherwise restores within workflows fail because the source is inaccessible (we don't pull anything from the source but the fact it can't be accessed is fatal and kills the restore step). So is this just me or might this be a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have (had) exactly the same scenario that you described. According to dotnet/arcade#6571 this will not be supported anymore. What I am doing now is to use different nuget.config files based on environment variables, which sadly is more a workaround than a true solution to the problem. |
Beta Was this translation helpful? Give feedback.
I have (had) exactly the same scenario that you described. According to dotnet/arcade#6571 this will not be supported anymore. What I am doing now is to use different nuget.config files based on environment variables, which sadly is more a workaround than a true solution to the problem.