Add custom package source to Visual Studio Code

Tomino picture Tomino · Dec 28, 2016 · Viewed 22.3k times · Source

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.

Answer

Alvis picture Alvis · Jun 7, 2017

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>