简体   繁体   中英

VS2015 NuGet private package repo source not updating

I have an issue in VS2015 where adding a NuGet source is not working. The picture below shows the source. The URL and package name is correct and working (I can successfully push packages to the repo).

The problem is when I add it, check the checkbox, and select "Update" and "Save", it does not activate the source. When I go back into the dialog, the checkbox is unchecked. It remains unchecked no matter what I do.

I think this is a GUI issue, the problem seems to be it simply is not enabling it. Is there a config option in a project file I can manually this package source?

(Note that "NAME" and " http://myrepo.com " are not the real source name and url, but I have verified they are correct by pushing to it successfully.

在此处输入图片说明

Edit:

I checked the NuGet.config file and there is indeed an entry in the file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <packageSources>
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
    <add key="NAME" value="http://myrepo.com" />
  </packageSources>
  <disabledPackageSources />
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
</configuration>

I had been running VS as administrator due to using a local IIS instance which requires administrator privileges, magicandre1981 pointed out that NuGet.config needs write permissions, so I gave full access to the folder to normal users (I believe the NuGet.config file was generated under the administrator context therefore lacking normal user permissions).

This by itself did not solve the issue, but doing a Nuget Package Restore afterwards, caused the NuGet feed to display again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM