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

Visual studio extension does not handle disable/enable packages correctly for local nuget.config #3237

Closed
dhvik opened this issue Jul 28, 2016 · 1 comment
Labels
Area:Settings NuGet.Config and related issues Product:VS.Client Resolution:ByDesign This issue appears to be ByDesign

Comments

@dhvik
Copy link

dhvik commented Jul 28, 2016

I have a global nuget.config that disables a package source (c:\users\myuser\AppData\Roaming\nuget\nuget.config)

<configuration>
  <packageSources>
    <add key="s1" value="http://someSite.com"/>
  <packageSource>
  <disabledPackageSources>
    <add key="s1" value="true"/>
  </disabledPackageSources>
</configuration>

Then i have a local nuget.config in my solution folder that also has the same package source defined

<configuration>
  <packageSources>
    <add key="s1" value="http://someSite.com"/>
  <packageSource>
</configuration>

This will display the package source as not selected
image
If I try to check it using the Options dialog in visual studio, and press OK, the choice is not persisted. If I check the local nuget.config, then it has been updated with the disablePackageSource from the parent config file instead.

I can work around the issue by adding a <clear/> inside the <disabledPackageSources> tag.

What I would suppose the dialog to do is to make that package source available for me (in my local config) but not in the global one.

@rrelyea
Copy link
Contributor

rrelyea commented Jul 28, 2016

[updating]
This is by design today.
Our dialog doesn't yet support hierarchical config settings well.
We plan to address that in the future: #1820

@rrelyea rrelyea added Resolution:ByDesign This issue appears to be ByDesign and removed Type:Bug labels Jul 28, 2016
@rrelyea rrelyea closed this as completed Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Settings NuGet.Config and related issues Product:VS.Client Resolution:ByDesign This issue appears to be ByDesign
Projects
None yet
Development

No branches or pull requests

3 participants