Skip to content
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

No Way to Override Hard-Coded Source in SourceRepositoryProvider.cs #662

Closed
rpriest1260 opened this issue May 18, 2018 · 2 comments
Closed
Labels
⚠️ Bug Something isn't working as expected

Comments

@rpriest1260
Copy link

Our build system blocks access to particular NuGet sources. We have our own trusted server that we use. Therefore, the hard-coded DefaultSources list in SourceRepositoryProvider.cs presents a problem when trying to generate documentation. There seems to be no way to opt out of using "https://api.nuget.org/v3/index.json".

Can this hard-coded value be removed, please?
Either that, or provide a way to disable it?

I would think that if a user specifies, in there WyamSettings:

   NuGetSources = new List<string>() {"https://mytrustednuget/"},
   UseGlobalSources = false,

that only that specified source should be used. If those particular settings are not specified, then it should use the sources configured in the user's\machine's NuGet Settings.

Could you please make this edit? Or, I could submit it if you wish. I intend to do nothing more than comment that line out.

Thanks.

rpriest1260 referenced this issue in rpriest1260/Wyam May 19, 2018
There are build systems that block access to "outside" NuGet sources.
Therefore, the hard-coded DefaultSources list in
SourceRepositoryProvider.cs presents a problem when trying to generate
documentation. There seems to be no way to opt out of using
"https://api.nuget.org/v3/index.json".
This fix removes this hard-coded value and leaves the decision to the
user via their NuGet.config setup or their WyamSettings specifications
(setting of NugetSources and UseGlobalSources).
@daveaglick daveaglick added the ⚠️ Bug Something isn't working as expected label May 29, 2018
@daveaglick
Copy link
Member

Sorry it took so long to get to this issue. Pretty sure it's the same as #673 (and even if it's not, the fix I added for that one should definitely resolve this one).

In the next version you'll be able to do the following, which will hopefully resolve your issues:

Wyam(new WyamSettings
{
    NuGetSources = new List<string> 
    {
        "<path-to-nuget-sources>",
    },
    IgnoreDefaultSources = true
});

If it doesn't please do circle back around and we'll reopen this issue.

FWIW, Wyam is dropping all direct NuGet support in the forthcoming 2.x release (see #668). That's not to say NuGet packages won't still be involved, just that Wyam will no longer be responsible for handling their installation - MSBuild will do that going forward.

@rpriest1260
Copy link
Author

Great! Thanks! Standing by for the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ Bug Something isn't working as expected
Development

No branches or pull requests

2 participants