Add custom package source to Visual Studio Code

偶尔善良 提交于 2019-11-27 17:18:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!