问题
Does anybody know how to add custom package source to Visual Studio Code?
E.g. I'd like to add https://www.myget.org/F/aspnet-contrib/api/v3/index.json as a package source and drive these packages through project.json.
回答1:
To add to the answer, adding a nuget.config
in the project solves it for the project. Adding to the root is ok. The config could look like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyGet" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
</packageSources>
</configuration>
回答2:
You can add a NuGet.config file and specify the package source in there. Some reference docs: https://docs.microsoft.com/en-us/nuget/schema/nuget-config-file
来源:https://stackoverflow.com/questions/41358490/add-custom-package-source-to-visual-studio-code