{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/2987","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/2987/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/2987/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/2987/events","html_url":"https://github.com/NuGet/Home/issues/2987","id":160636945,"number":2987,"title":"Configuration override and defaults problem","user":{"login":"mmajcica","id":3026551,"avatar_url":"https://avatars.githubusercontent.com/u/3026551?v=3","gravatar_id":"","url":"https://api.github.com/users/mmajcica","html_url":"https://github.com/mmajcica","followers_url":"https://api.github.com/users/mmajcica/followers","following_url":"https://api.github.com/users/mmajcica/following{/other_user}","gists_url":"https://api.github.com/users/mmajcica/gists{/gist_id}","starred_url":"https://api.github.com/users/mmajcica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmajcica/subscriptions","organizations_url":"https://api.github.com/users/mmajcica/orgs","repos_url":"https://api.github.com/users/mmajcica/repos","events_url":"https://api.github.com/users/mmajcica/events{/privacy}","received_events_url":"https://api.github.com/users/mmajcica/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-16T11:14:51Z","updated_at":"2016-06-23T20:08:29Z","closed_at":null,"body":"Given the following scenario:\r\n\r\nIn the %ProgramData%\\NuGet\\Config\\NuGet.config file, I will add the following:\r\n\r\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <config>\r\n    <add key=\"repositoryPath\" value=\"E:\\packages\" />\r\n  </config>\r\n  <packageSources>\r\n    <add key=\"Nexus NuGet Proxy\" value=\"http://blabl/service/local/nuget/feed/\" />\r\n  </packageSources>\r\n  <disabledPackageSources>\r\n    <add key=\"nuget.org\" value=\"true\" />\r\n  </disabledPackageSources>\r\n</configuration>`\r\n\r\nnow, the user specific config file %AppData%\\NuGet\\NuGet.config is not present.\r\nIf I do execute 'nuget sources list' the %AppData%\\NuGet\\NuGet.config gets created with the following content:\r\n\r\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <packageSources>\r\n    <add key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" />\r\n  </packageSources>\r\n  <disabledPackageSources>\r\n    <add key=\"Nexus NuGet Proxy\" value=\"true\" />\r\n  </disabledPackageSources>\r\n</configuration>`\r\n\r\nNow, why is the nuget.org package source automatically added?\r\nHow so that my custom package source is automatically disabled?\r\n\r\nIs this a bug or is there a workaround?\r\nNuGet client is the latest available version. Some older version like 3.2.1 have even more unexpected behavior as non respecting the disabledPackageSources and ignoring attributes."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/228168377","html_url":"https://github.com/NuGet/Home/issues/2987#issuecomment-228168377","issue_url":"https://api.github.com/repos/NuGet/Home/issues/2987","id":228168377,"user":{"login":"zhili1208","id":7131513,"avatar_url":"https://avatars.githubusercontent.com/u/7131513?v=3","gravatar_id":"","url":"https://api.github.com/users/zhili1208","html_url":"https://github.com/zhili1208","followers_url":"https://api.github.com/users/zhili1208/followers","following_url":"https://api.github.com/users/zhili1208/following{/other_user}","gists_url":"https://api.github.com/users/zhili1208/gists{/gist_id}","starred_url":"https://api.github.com/users/zhili1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhili1208/subscriptions","organizations_url":"https://api.github.com/users/zhili1208/orgs","repos_url":"https://api.github.com/users/zhili1208/repos","events_url":"https://api.github.com/users/zhili1208/events{/privacy}","received_events_url":"https://api.github.com/users/zhili1208/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T20:08:29Z","updated_at":"2016-06-23T20:08:29Z","body":"@mesheets @mmajcica I think you need to use NuGetDefault.Config, it will work for your case.https://docs.nuget.org/consume/nuget-config-defaults"}}
{"actor":{"display_login":"zhili1208"}}